Re: [PATCH] netlink oops fix due to incorrect error code

2 messages, 2 authors, 2006-01-09 · open the first message on its own page

Re: [PATCH] netlink oops fix due to incorrect error code

From: Patrick McHardy <hidden>
Date: 2006-01-09 23:51:41

Kirill Korotaev wrote:
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 <redacted>
Signed-Off-By: Kirill Korotaev <redacted>
Good catch. Dave, please apply.
quoted hunk
------------------------------------------------------------------------
--- ./net/netlink/af_netlink.c.nlfix	2006-01-06 18:37:28.000000000 +0300
+++ ./net/netlink/af_netlink.c	2006-01-09 16:40:49.000000000 +0300
@@ -416,7 +416,7 @@ static int netlink_create(struct socket 
 	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);

Re: [PATCH] netlink oops fix due to incorrect error code

From: "David S. Miller" <davem@davemloft.net>
Date: 2006-01-09 23:59:24

From: Patrick McHardy <redacted>
Date: Tue, 10 Jan 2006 00:50:52 +0100
Kirill Korotaev wrote:
quoted
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 <redacted>
Signed-Off-By: Kirill Korotaev <redacted>
Good catch. Dave, please apply.
Already in Linus's tree, he applied it directly :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help