[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121205.162150.1116416856345924607.davem@davemloft.net>
Date: Wed, 05 Dec 2012 16:21:50 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: dlstevens@...ibm.com
Cc: eric.dumazet@...il.com, netdev@...r.kernel.org,
netdev-owner@...r.kernel.org
Subject: Re: [PATCH net-next] ipv6: avoid taking locks at socket dismantle
From: David Stevens <dlstevens@...ibm.com>
Date: Wed, 5 Dec 2012 16:07:16 -0500
>> From: Eric Dumazet <edumazet@...gle.com>
>>
>> ipv6_sock_mc_close() is called for ipv6 sockets at close time, and most
>> of them don't use multicast.
>>
>> Add a test to avoid contention on a shared spinlock.
>>
>> Same heuristic applies for ipv6_sock_ac_close(), to avoid contention
>> on a shared rwlock.
>
> What prevents a different thread from racing with the
> tests for NULL on these?
The socket is being torn apart, which means that operations on it's
FD are no longer possible, which means that no other thread can add
entries to these lists.
--
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