| 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 11:57:01 +0200 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx> |
| In-reply-to: | <20050511230309.GA21547@xxxxxxxxxxxxxxxxxxx> |
| References: | <428284D6.9000804@xxxxxxxxx> <20050511222421.GA21331@xxxxxxxxxxxxxxxxxxx> <4282889A.7080409@xxxxxxxxx> <20050511230309.GA21547@xxxxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Thu, 2005-05-12 at 01:03, Herbert Xu wrote: > 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. You're right, Herbert. The interception by recvmsg has to be considered in this case also. Tricky. I moved the call to skb_orphan in the other patch, as you suggested. I think that also makes this patch safe as it is. Right? -Tommy |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: tg3 support broken on PPC, a workaround, Manuel Perez Ayala |
|---|---|
| Next by Date: | Re: assertion (!atomic_read(&sk->sk_rmem_alloc)) failed at net/netlink/af_netlink.c (122), Tommy Christensen |
| Previous by Thread: | Re: [PATCH] netlink: defer socket destruction a bit, Herbert Xu |
| Next by Thread: | Re: [PATCH] netlink: defer socket destruction a bit, Herbert Xu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |