diff options
author | Masahide NAKAMURA <nakam@linux-ipv6.org> | 2006-12-05 16:48:27 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-06 21:39:09 -0500 |
commit | 4e33fa14faecc150e97c0e4f2320745bdc7b7112 (patch) | |
tree | 1359902f5a43b3621098d2bac6a7b209ca0da141 /net | |
parent | 9a217a1c7e7f36ec4996314d64267dd711dbd9bf (diff) |
[IPV6] RAW: Don't release unlocked sock.
When user builds IPv6 header and send it through raw socket, kernel
tries to release unlocked sock. (Kernel log shows
"BUG: bad unlock balance detected" with enabled debug option.)
The lock is held only for non-hdrincl sock in this function
then this patch fix to do nothing about lock for hdrincl one.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/raw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index c2e629d6aea4..4ae1b19ada5d 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -854,7 +854,8 @@ back_from_confirm: | |||
854 | } | 854 | } |
855 | done: | 855 | done: |
856 | dst_release(dst); | 856 | dst_release(dst); |
857 | release_sock(sk); | 857 | if (!inet->hdrincl) |
858 | release_sock(sk); | ||
858 | out: | 859 | out: |
859 | fl6_sock_release(flowlabel); | 860 | fl6_sock_release(flowlabel); |
860 | return err<0?err:len; | 861 | return err<0?err:len; |