Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e33fa14 authored by Masahide NAKAMURA's avatar Masahide NAKAMURA Committed by David S. Miller
Browse files

[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: default avatarMasahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9a217a1c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -854,6 +854,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
	}
done:
	dst_release(dst);
	if (!inet->hdrincl)
		release_sock(sk);
out:	
	fl6_sock_release(flowlabel);