[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20071107.023431.52915555.davem@davemloft.net>
Date: Wed, 07 Nov 2007 02:34:31 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: yoshfuji@...ux-ipv6.org
Cc: 12o3l@...cali.nl, netdev@...r.kernel.org
Subject: Re: [BUG] in inet6_create
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@...ux-ipv6.org>
Date: Mon, 05 Nov 2007 20:00:46 +0900 (JST)
> [IPV6]: Ensure to initialize inetsw6 array before we start accepting socket.
>
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@...ux-ipv6.org>
>
> diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
> index ecbd388..9ecd41b 100644
> --- a/net/ipv6/af_inet6.c
> +++ b/net/ipv6/af_inet6.c
> @@ -789,6 +789,7 @@ static int __init inet6_init(void)
> /* Register the socket-side information for inet6_create. */
> for(r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
> INIT_LIST_HEAD(r);
> + synchronize_net();
>
> /* We MUST register RAW sockets before we create the ICMP6,
> * IGMP6, or NDISC control sockets.
>
I don't see how this can make a difference.
sock_register() takes spinlocks, and therefore provides
a full memory barrier. The list initializations MUST
appear before any code path can see inet6_create() and
friends.
I simply cannot see how this crash is even possible.
Also, the original bug reporter cannot provide an inet6.o image that
matches any of his OOPS traces, so we cannot analyze this bug properly.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists