[2.6.20.21 review 33/35] Fix ipv6 double-sock-release with MSG_CONFIRM

Willy Tarreau
2007-10-13T14:52:57Z

[-- Attachment #1: 0093-Fix-ipv6-double-sock-release-with-MSG_CONFIRM.patch --]
[-- Type: text/plain, Size: 780 bytes --]

commit 3ef9d943d26dea764f4fecf3767001c90b778b0c in mainline

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv6/raw.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

Index: 2.6/net/ipv6/raw.c
===================================================================
--- 2.6.orig/net/ipv6/raw.c
+++ 2.6/net/ipv6/raw.c
@@ -851,11 +851,10 @@ back_from_confirm:
ip6_flush_pending_frames(sk);
else if (!(msg->msg_flags & MSG_MORE))
err = rawv6_push_pending_frames(sk, &fl, rp);
+ release_sock(sk);
}
done:
dst_release(dst);
- if (!inet->hdrincl)
- release_sock(sk);
out:
fl6_sock_release(flowlabel);
return err<0?err:len;

--