提交 4e33fa14 编写于 作者: M Masahide NAKAMURA 提交者: David S. Miller

[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: NMasahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9a217a1c
......@@ -854,7 +854,8 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
}
done:
dst_release(dst);
release_sock(sk);
if (!inet->hdrincl)
release_sock(sk);
out:
fl6_sock_release(flowlabel);
return err<0?err:len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册