lkml.org 
[lkml]   [2004]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: page allocation failure
On Tue, 24 Aug 2004 13:05:31 -0700
Andrew Morton <akpm@osdl.org> wrote:

> It's networking trying to allocate eight physically-contiguous pages with
> GFP_ATOMIC. Can you say "snowball's chance in hell"?

It's netfilter's ip_nat_fn() calling skb_checksum_help() which does
an skb_copy() if the skb is either shared or cloned.

This patch from Herbert Xu, which I may integrate tonight, should
help with this case.

===== net/core/dev.c 1.155 vs edited =====
--- 1.155/net/core/dev.c 2004-07-31 07:23:04 +10:00
+++ edited/net/core/dev.c 2004-08-24 20:59:57 +10:00
@@ -1144,16 +1144,10 @@
goto out;
}

- if (skb_shared(*pskb) || skb_cloned(*pskb)) {
- struct sk_buff *newskb = skb_copy(*pskb, GFP_ATOMIC);
- if (!newskb) {
- ret = -ENOMEM;
+ if (skb_cloned(*pskb)) {
+ ret = pskb_expand_head(*pskb, 0, 0, GFP_ATOMIC);
+ if (ret)
goto out;
- }
- if ((*pskb)->sk)
- skb_set_owner_w(newskb, (*pskb)->sk);
- kfree_skb(*pskb);
- *pskb = newskb;
}

if (offset > (int)(*pskb)->len)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.038 / U:1.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site