From f1a0f5db34833dda532a24f53d2f4fa53a48b973 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Mon, 9 Jan 2006 18:39:23 -0800 Subject: [PATCH] Add netlink oops fix from Kirill Korotaev --- ...oops-fix-due-to-incorrect-error-code.patch | 33 +++++++++++++++++++ queue/series | 1 + 2 files changed, 34 insertions(+) create mode 100644 queue/netlink-oops-fix-due-to-incorrect-error-code.patch 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 index 00000000000..884d7aa9cb7 --- /dev/null +++ b/queue/netlink-oops-fix-due-to-incorrect-error-code.patch @@ -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 +To: Linus Torvalds , Andrew Morton , + linux-kernel@vger.kernel.org, "Dmitry Mishin" , + Stanislav Protassov +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 +Signed-Off-By: Kirill Korotaev +Signed-off-by: Chris Wright +--- + 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); diff --git a/queue/series b/queue/series index 8ff181040e5..ac7f2baee4f 100644 --- a/queue/series +++ b/queue/series @@ -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 -- 2.47.3