[Top] [All Lists]

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

To: Tommy Christensen <tommy.christensen@xxxxxxxxx>
Subject: Re: [PATCH] netlink: defer socket destruction a bit
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 May 2005 09:03:09 +1000
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx>
In-reply-to: <>
References: <> <> <>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Thu, May 12, 2005 at 12:35:06AM +0200, Tommy Christensen wrote:
> No, skb2 cannot be shared with a listening socket. As I read the code,
> it can only be non-null when delivery has failed.

What about this code path:

1) skb2 = skb, refcnt++.
2) Devliered to socket 1.
3) Socket 1 frees skb through recvmsg.
4) skb2 = skb, refcnt++.
5) Delivery fails.

Now skb2 is identical to skb and they both refer to socket 1.

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page:
PGP Key:

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