lkml.org 
[lkml]   [2006]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] netlink oops fix due to incorrect error code
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 <dim@sw.ru>
> Signed-Off-By: Kirill Korotaev <dev@openvz.org>

Good catch. Dave, please apply.

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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-10 00:54    [from the cache]
©2003-2011 Jasper Spaans