]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Add netlink oops fix from Kirill Korotaev
authorChris Wright <chrisw@sous-sol.org>
Tue, 10 Jan 2006 02:39:23 +0000 (18:39 -0800)
committerChris Wright <chrisw@sous-sol.org>
Tue, 10 Jan 2006 02:39:23 +0000 (18:39 -0800)
queue/netlink-oops-fix-due-to-incorrect-error-code.patch [new file with mode: 0644]
queue/series

diff --git a/queue/netlink-oops-fix-due-to-incorrect-error-code.patch b/queue/netlink-oops-fix-due-to-incorrect-error-code.patch
new file mode 100644 (file)
index 0000000..884d7aa
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org  Mon Jan  9 09:41:37 2006
+Message-ID: <43C27662.2030400@openvz.org>
+Date: Mon, 09 Jan 2006 17:42:42 +0300
+From: Kirill Korotaev <dev@openvz.org>
+To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
+        linux-kernel@vger.kernel.org, "Dmitry Mishin" <dim@sw.ru>,
+        Stanislav Protassov <st@sw.ru>
+Cc: 
+Subject: [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: Chris Wright <chrisw@sous-sol.org>
+---
+ net/netlink/af_netlink.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- linux-2.6.15.y.orig/net/netlink/af_netlink.c
++++ linux-2.6.15.y/net/netlink/af_netlink.c
+@@ -402,7 +402,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);
index 8ff181040e55edbb5339631671a96b0485dce030..ac7f2baee4fc452319f18c66b71f7e73707bfe5f 100644 (file)
@@ -5,3 +5,4 @@ fix-ATY-video-on-sunblade.patch
 ppc32-re-add-embed_configc-to-ml300-ep405.patch
 vgacon-fix-doublescan-mode.patch
 fix-workqueue-oops-during-cpu-offline.patch
+netlink-oops-fix-due-to-incorrect-error-code.patch