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>
Subject: [PATCH] netlink oops fix due to incorrect error code
Date: Mon, 09 Jan 2006 17:42:42 +0300 [thread overview]
Message-ID: <43C27662.2030400@openvz.org> (raw)
[-- 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);
next reply other threads:[~2006-01-09 14:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-09 14:42 Kirill Korotaev [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43C27662.2030400@openvz.org \
--to=dev@openvz.org \
--cc=akpm@osdl.org \
--cc=dim@sw.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=st@sw.ru \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.