public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: dominik.karall@gmx.net, linux-kernel@vger.kernel.org
Subject: Re: page allocation failure
Date: Tue, 24 Aug 2004 15:57:27 -0700	[thread overview]
Message-ID: <20040824155727.4749e6ad.davem@redhat.com> (raw)
In-Reply-To: <20040824130531.3cbb03d1.akpm@osdl.org>

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)


  reply	other threads:[~2004-08-24 22:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 20:05 page allocation failure Dominik Karall
2004-08-24 20:05 ` Andrew Morton
2004-08-24 22:57   ` David S. Miller [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-01-19 11:36 Oliver Kiddle
2004-01-19 14:54 ` Mike Fedyk
2004-01-19 17:29   ` Oliver Kiddle
2004-01-19 18:12     ` Mike Fedyk
2004-01-20  3:38 ` Andrew Morton
2004-01-20  6:00   ` Nathan Scott
2004-01-20 17:08   ` Oliver Kiddle
2004-01-20 18:35     ` Mike Fedyk
2004-01-22  9:29       ` Oliver Kiddle
2004-01-22  9:59         ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040824155727.4749e6ad.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=akpm@osdl.org \
    --cc=dominik.karall@gmx.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox