From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A3142868A6 for ; Tue, 16 Sep 2025 09:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758014495; cv=none; b=q5t9PRL491E/L77X/BzGAcLEzBv4BGzUOTrjh5gTqK21CRyHce1pehArGwGEskunDUKwHCyqtdG0DSx4ri67pQ8HHmnqSPO1ShFPfLWC8nVz5qxAn7vDeDeXWnlV4PyRlZks9ziOuRMorJCAoTMGhcaBM/RMo/5eohsII7ySGuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758014495; c=relaxed/simple; bh=fHCgaSHMfZ8MihYV55qC/Iyj1UrsAPT7d42hSGY4LLU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sqtRnXo1Dhf8RoUtlrtmDtYO4exJcmnNmIJ+/rLAITeAMKRaP6t5Htz0ZQu9jU9xLHl1KhnMFw7Qnsa1b5BZAo8Z2D1xjzp5rTk0zTlbp7sx5MmCead0nQTffJfk7oVPuQC0GgHiJ9zhmUOcgk1lGTlvNsrZArNVcg6xmPPi8Ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=LDZco6Cn; arc=none smtp.client-ip=95.215.58.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="LDZco6Cn" Message-ID: <0ab15522-d5cd-4898-881f-4a8c867e4980@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1758014491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dXj6W/toc1FHvht0kF0dcaLY4qFh6ccrS0Ipr0OO1o0=; b=LDZco6CnmhMKcw9l8HcVVX7893dPcMtYVpQ3PsaL0sqc0KTW6uHGN1qbXTAbUJgor1Qycw 2w3jv4wJbZCsii3DfDMgU9gBUUkYCssQEXtlSJ5lL9UvD/yE8jFeY1PAFX7EArtN2ZCEtJ mqW1lkP5U7WyubYu3tNAunupiqczAQM= Date: Tue, 16 Sep 2025 17:20:46 +0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next v2 0/3] net: Avoid ehash lookup races To: Eric Dumazet Cc: kuniyu@google.com, kerneljasonxing@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, Xuanqiang Luo References: <20250916064614.605075-1-xuanqiang.luo@linux.dev> <09d9a014-5687-4b60-9646-95c3644efe19@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: luoxuanqiang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2025/9/16 17:02, Eric Dumazet 写道: > On Tue, Sep 16, 2025 at 1:12 AM luoxuanqiang wrote: >> >> 在 2025/9/16 15:30, Eric Dumazet 写道: >>> On Mon, Sep 15, 2025 at 11:47 PM wrote: >>>> From: Xuanqiang Luo >>>> >>>> After replacing R/W locks with RCU in commit 3ab5aee7fe84 ("net: Convert >>>> TCP & DCCP hash tables to use RCU / hlist_nulls"), a race window emerged >>>> during the switch from reqsk/sk to sk/tw. >>>> >>>> Now that both timewait sock (tw) and full sock (sk) reside on the same >>>> ehash chain, it is appropriate to introduce hlist_nulls replace >>>> operations, to eliminate the race conditions caused by this window. >>>> >>>> --- >>>> Changes: >>>> v2: >>>> * Patch 1 >>>> * Use WRITE_ONCE() to initialize old->pprev. >>>> * Patch 2&3 >>>> * Optimize sk hashed check. Thanks Kuni for pointing it out! >>>> >>>> v1: https://lore.kernel.org/all/20250915070308.111816-1-xuanqiang.luo@linux.dev/ >>> Note : I think you sent an earlier version, you should have added a >>> link to the discussion, >>> and past feedback/suggestions. >>> >>> Lack of credit is a bit annoying frankly. >>> >>> I will take a look at your series, thanks. >> This patch's solution isn't very related to previous ones, so I didn't >> include prior discussions. > This is completely related, aiming to fix the same issue, do not try > to pretend otherwise. > > Really, adding more context and acknowledging that reviewers > made suggestions would be quite fair. > > This is a difficult series, with a lot of potential bugs, you need to bring > us on board. I understand your point. I’m sorry for wasting your time on this. Please disregard this series submission — I will send the next version soon, which will include the mentioned background information. I apologize again for my misunderstanding. Thanks Xuanqiang.