From: Andrew Morton <akpm@osdl.org>
To: "David S. Miller" <davem@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: [patch] fix networking memory leak in current -bk
Date: Sat, 4 Oct 2003 00:36:00 -0700 [thread overview]
Message-ID: <20031004003600.6905f268.akpm@osdl.org> (raw)
Quicky fix for a horrid skb data leak...
net/core/dev.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff -puN net/core/dev.c~skb-leak-fix net/core/dev.c
--- 25/net/core/dev.c~skb-leak-fix 2003-10-04 00:32:19.000000000 -0700
+++ 25-akpm/net/core/dev.c 2003-10-04 00:33:18.000000000 -0700
@@ -1576,9 +1576,13 @@ int netif_receive_skb(struct sk_buff *sk
}
}
- if (pt_prev)
- ret = deliver_skb(skb, pt_prev, 1);
- else {
+ if (pt_prev) {
+ if (!pt_prev->data) {
+ ret = deliver_to_old_ones(pt_prev, skb, 1);
+ } else {
+ ret = pt_prev->func(skb, skb->dev, pt_prev);
+ }
+ } else {
kfree_skb(skb);
/* Jamal, now you will not able to escape explaining
* me how you were going to use this. :-)
_
reply other threads:[~2003-10-04 7:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20031004003600.6905f268.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=davem@redhat.com \
--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
all inboxes | Powered by JetHome®