lkml.org 
[lkml]   [2003]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] fix networking memory leak in current -bk

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. :-)
_

-
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 13:49    [W:0.047 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site