projects/linux·commit 14591de1

[PATCH] netlink oops fix due to incorrect error code

14591de1 · Kirill Korotaev <[email protected]> · 2006-01-09 17:42:42 +03:00

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 <[email protected]>
Signed-Off-By: Kirill Korotaev <[email protected]>
Signed-Off-By: Linus Torvalds <[email protected]>
Commit
14591de147f7c9656fa2b9c05680d2b46e286c40
Parents
67751777

Changes

1 files changed · +1 −1

FileStatusAddDelContent
net/netlink/af_netlink.cmodified+1−1View file

net/netlink/af_netlink.c

View file
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 7849cac..a67f1b4 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -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);