netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tommy Christensen <tommy.christensen@tpack.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@oss.sgi.com, Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Subject: Re: [PATCH] netlink: defer socket destruction a bit
Date: Thu, 12 May 2005 00:35:06 +0200	[thread overview]
Message-ID: <4282889A.7080409@tpack.net> (raw)
In-Reply-To: <20050511222421.GA21331@gondor.apana.org.au>

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-work/net/netlink/af_netlink.c
>>--- linux-2.6.12-rc4/net/netlink/af_netlink.c	2005-05-11 11:10:20.000000000 +0200
>>+++ linux-2.6.12-work/net/netlink/af_netlink.c	2005-05-12 00:11:08.990990172 +0200
>>@@ -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);
>>+
>> 	netlink_unlock_table();
>> 
>> 	if (info.skb2)
>> 		kfree_skb(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.

-Tommy

  reply	other threads:[~2005-05-11 22:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-11 22:19 [PATCH] netlink: defer socket destruction a bit Tommy Christensen
2005-05-11 22:24 ` Herbert Xu
2005-05-11 22:35   ` Tommy Christensen [this message]
2005-05-11 23:03     ` Herbert Xu
2005-05-12  9:57       ` Tommy Christensen
2005-05-12 10:36         ` Herbert Xu
2005-05-19 20:08           ` David S. Miller
2005-05-19 21:38             ` Herbert Xu
2005-05-19 23:15               ` Tommy Christensen
2005-05-19 23:16                 ` David S. Miller

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=4282889A.7080409@tpack.net \
    --to=tommy.christensen@tpack.net \
    --cc=chamas@h4.dion.ne.jp \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).