Re: [PATCH net-next-2.6] tcp: connect() race with timewait reuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Evgeniy Polyakov a écrit :
> Hi.
> 
> Looks very good, thanks Eric, I have one question.
> 
> On Wed, Dec 02, 2009 at 04:08:59PM +0100, Eric Dumazet (eric.dumazet@xxxxxxxxx) wrote:
>> +
>> +/*
>> + * unhash a timewait socket from established hash
>> + * lock must be hold by caller
>> + */
>> +void inet_twsk_unhash(struct inet_timewait_sock *tw)
>> +{
>> +	if (hlist_nulls_unhashed(&tw->tw_node))
>> +		return;
>> +
>> +	hlist_nulls_del_rcu(&tw->tw_node);
>> +	sk_nulls_node_init(&tw->tw_node);
>> +	inet_twsk_put(tw);
> 
> Is it safe to call in locked context? inet_twsk_put() schedules
> preemption, also I did not check what tw destructor does.
> 

You are probably right, we could defer the inet_twsk_put(tw) out of locked
section, you or I will submit another patch to correct this.

Thanks !
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux