netdev
[Top] [All Lists]

Re: [patch 3/3] x25_create initializing socket data twice

To: akpm@xxxxxxxx
Subject: Re: [patch 3/3] x25_create initializing socket data twice
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 05 Mar 2005 19:47:49 +1100
Cc: davem@xxxxxxxxxxxxx, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, akpm@xxxxxxxx, herbert@xxxxxxxxxxxx
In-reply-to: <200503041237.j24Cbdbm026482@xxxxxxxxxxxxxxxxxxx>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686))
akpm@xxxxxxxx wrote:
> 
> x25_create() [net/x25/af_x25.c] is calling sock_init_data() twice ...  once
> indirectly via x25_alloc_socket() and a second time directly via
> sock_init_data(sock, sk);
> 
> while this might not look as critical as it seems, it can easily break
> stuff which assumes that sock_init_data() isn't called twice on the same
> socket.

As someone pointed out on LKML, this is broken since the sock_init_data
in x25_alloc_socket() is called with the first argument set to NULL.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>