netdev
[Top] [All Lists]

Re: [IPSEC] Store idev entries (was: [PATCH][IPv6][IPsec] stop infinite

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Re: [IPSEC] Store idev entries (was: [PATCH][IPv6][IPsec] stop infinite loop)
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 May 2005 10:46:00 +1000
Cc: yoshfuji@xxxxxxxxxxxxxx, kazunori@xxxxxxxxxxxx, netdev@xxxxxxxxxxx, usagi-core@xxxxxxxxxxxxxx
In-reply-to: <20050503162628.7541807d.davem@xxxxxxxxxxxxx>
References: <4272EC95.20401@xxxxxxxxxxxx> <20050430.120736.45974367.yoshfuji@xxxxxxxxxxxxxx> <20050430031159.GA24326@xxxxxxxxxxxxxxxxxxx> <20050430082339.GA20338@xxxxxxxxxxxxxxxxxxx> <20050430114349.GA24573@xxxxxxxxxxxxxxxxxxx> <20050503162628.7541807d.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
On Tue, May 03, 2005 at 04:26:28PM -0700, David S. Miller wrote:
> 
> Applied, thanks Herbert.

Thanks Dave.

BTW, I was reviewing the rt6i_idev usage in IPv6 and it seems to me
that they need some protection with locking or RCU.  As it is they
are simply dereferenced in user/softirq context with no locking.

For example, the call chain udpv6_sendmsg -> ip6_dst_lookup ->
ipv6_get_saddr occurs in user context and simply dereferences
rt6i_idev.  The race condition is that another CPU could come
in and free rt6i_idev.  The reference count held by the dst
entry doesn't help since the other CPU will drop the reference
count for us through dst_ifdown.

Yoshifuji-san, does this look like a real problem to you?

Cheers,
-- 
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>