Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
This commit is contained in:
commit
25c43bf13b
38 changed files with 200 additions and 88 deletions
|
@ -354,15 +354,12 @@ void sk_clear_memalloc(struct sock *sk)
|
|||
|
||||
/*
|
||||
* SOCK_MEMALLOC is allowed to ignore rmem limits to ensure forward
|
||||
* progress of swapping. However, if SOCK_MEMALLOC is cleared while
|
||||
* it has rmem allocations there is a risk that the user of the
|
||||
* socket cannot make forward progress due to exceeding the rmem
|
||||
* limits. By rights, sk_clear_memalloc() should only be called
|
||||
* on sockets being torn down but warn and reset the accounting if
|
||||
* that assumption breaks.
|
||||
* progress of swapping. SOCK_MEMALLOC may be cleared while
|
||||
* it has rmem allocations due to the last swapfile being deactivated
|
||||
* but there is a risk that the socket is unusable due to exceeding
|
||||
* the rmem limits. Reclaim the reserves and obey rmem limits again.
|
||||
*/
|
||||
if (WARN_ON(sk->sk_forward_alloc))
|
||||
sk_mem_reclaim(sk);
|
||||
sk_mem_reclaim(sk);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sk_clear_memalloc);
|
||||
|
||||
|
@ -1872,7 +1869,7 @@ bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t gfp)
|
|||
|
||||
pfrag->offset = 0;
|
||||
if (SKB_FRAG_PAGE_ORDER) {
|
||||
pfrag->page = alloc_pages(gfp | __GFP_COMP |
|
||||
pfrag->page = alloc_pages((gfp & ~__GFP_WAIT) | __GFP_COMP |
|
||||
__GFP_NOWARN | __GFP_NORETRY,
|
||||
SKB_FRAG_PAGE_ORDER);
|
||||
if (likely(pfrag->page)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue