瀏覽代碼

[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: Dmitry Mishin <dim@sw.ru>
Signed-Off-By: Kirill Korotaev <dev@openvz.org>
Signed-Off-By: Linus Torvalds <torvalds@osdl.org>
Kirill Korotaev 19 年之前
父節點
當前提交
14591de147
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/netlink/af_netlink.c

+ 1 - 1
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);