Commit e7594b2f authored by Kirill Korotaev's avatar Kirill Korotaev Committed by Chris Wright

[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: default avatarDmitry Mishin <dim@sw.ru>
Signed-Off-By: default avatarKirill Korotaev <dev@openvz.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 4e5ae24c
...@@ -402,7 +402,7 @@ static int netlink_create(struct socket *sock, int protocol) ...@@ -402,7 +402,7 @@ static int netlink_create(struct socket *sock, int protocol)
groups = nl_table[protocol].groups; groups = nl_table[protocol].groups;
netlink_unlock_table(); netlink_unlock_table();
if ((err = __netlink_create(sock, protocol) < 0)) if ((err = __netlink_create(sock, protocol)) < 0)
goto out_module; goto out_module;
nlk = nlk_sk(sock->sk); nlk = nlk_sk(sock->sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment