Skip to content

Commit

Permalink
[PATCH] netlink oops fix due to incorrect error code
Browse files Browse the repository at this point in the history
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: Dmitry Mishin <dim@sw.ru>
Signed-Off-By: Kirill Korotaev <dev@openvz.org>
Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Jan 9, 2006
1 parent 6775177 commit 14591de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netlink/af_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14591de

Please sign in to comment.