[Top] [All Lists]

Re: [PATCH] netlink: defer socket destruction a bit

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] netlink: defer socket destruction a bit
From: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Date: Thu, 12 May 2005 00:35:06 +0200
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx>
In-reply-to: <>
References: <> <>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803
Herbert Xu wrote:
On Thu, May 12, 2005 at 12:19:02AM +0200, Tommy Christensen wrote:

diff -ru linux-2.6.12-rc4/net/netlink/af_netlink.c 
--- linux-2.6.12-rc4/net/netlink/af_netlink.c   2005-05-11 11:10:20.000000000 
+++ linux-2.6.12-work/net/netlink/af_netlink.c  2005-05-12 00:11:08.990990172 
@@ -785,11 +785,12 @@
        sk_for_each_bound(sk, node, &nl_table[ssk->sk_protocol].mc_list)
                do_one_broadcast(sk, &info);

+       kfree_skb(skb);

        if (info.skb2)
-       kfree_skb(skb);

Good catch. But doesn't this affect skb2 as well?

No, skb2 cannot be shared with a listening socket. As I read the code, it can only be non-null when delivery has failed.


<Prev in Thread] Current Thread [Next in Thread>