]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] netlink oops fix due to incorrect error code
authorKirill Korotaev <dev@openvz.org>
Mon, 9 Jan 2006 14:42:42 +0000 (17:42 +0300)
committerChris Wright <chrisw@sous-sol.org>
Sun, 15 Jan 2006 06:15:29 +0000 (22:15 -0800)
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: Chris Wright <chrisw@sous-sol.org>
net/netlink/af_netlink.c

index 96020d7087e8f131c3ebab3d6d0355cc595809fd..a002f2b686f25e2cc3d8db5abf1fc0760c26e7c3 100644 (file)
@@ -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);