提交 14591de1 编写于 作者: K Kirill Korotaev 提交者: Linus Torvalds

[PATCH] netlink oops fix due to incorrect error code

Fixed oops after failed netlink socket creation.

Wrong parathenses in if() statement caused err to be 1,
instead of negative value.

Trivial fix, not trivial to find though.
Signed-Off-By: NDmitry Mishin <dim@sw.ru>
Signed-Off-By: NKirill Korotaev <dev@openvz.org>
Signed-Off-By: NLinus Torvalds <torvalds@osdl.org>
上级 67751777
......@@ -402,7 +402,7 @@ static int netlink_create(struct socket *sock, int protocol)
groups = nl_table[protocol].groups;
netlink_unlock_table();
if ((err = __netlink_create(sock, protocol) < 0))
if ((err = __netlink_create(sock, protocol)) < 0)
goto out_module;
nlk = nlk_sk(sock->sk);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册