Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sat, 4 Oct 2003 00:36:00 -0700 | From | Andrew Morton <> | 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/
| ![\](/images/icornerr.gif) |