All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netlink oops fix due to incorrect error code
@ 2006-01-09 14:42 Kirill Korotaev
  2006-01-09 21:09 ` [PATCH] Fix more "if ((err = foo() < 0))" typos Alexey Dobriyan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Kirill Korotaev @ 2006-01-09 14:42 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, linux-kernel, Dmitry Mishin,
	Stanislav Protassov

[-- Attachment #1: Type: text/plain, Size: 292 bytes --]

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>

Kirill
P.S. against 2.6.15


[-- Attachment #2: diff-ms-netlink-create-fix-20060109 --]
[-- Type: text/plain, Size: 420 bytes --]

--- ./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);


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-10  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-09 14:42 [PATCH] netlink oops fix due to incorrect error code Kirill Korotaev
2006-01-09 21:09 ` [PATCH] Fix more "if ((err = foo() < 0))" typos Alexey Dobriyan
2006-01-09 23:50 ` [PATCH] netlink oops fix due to incorrect error code Patrick McHardy
2006-01-09 23:54   ` David S. Miller
2006-01-10  8:38 ` [stable] " Chris Wright

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.