Article View: linux.kernel.netdev
Article #12410Re: [PATCH net] net: reuseport: avoid duplicate closed socket insertion
From: Jiayuan Chen
Date: Sat, 07 Nov 2026 05:02
Date: Sat, 07 Nov 2026 05:02
21 lines
9066 bytes
9066 bytes
On 11/6/26 9:58 PM, Lin Jiapeng wrote: > Clearing SO_REUSEPORT on a TCP listener clears sk_reuseport but leaves > sk_reuseport_cb attached to its reuseport group. A subsequent listen() > does not put the socket back into the listening section because > inet_hash() checks sk_reuseport. However, inet_unhash() checks > sk_reuseport_cb and calls reuseport_stop_listen_sock(). > > With request migration enabled, reuseport_stop_listen_sock() ignores > whether __reuseport_detach_sock() actually removed the socket from the > listening section and unconditionally appends it to the closed section. > Repeated connect(AF_UNSPEC)/listen() cycles therefore insert the same > socket until num_closed_socks exceeds max_socks. The next insertion > writes before socks[], overlapping prog on x86-64 and leading to type > confusion when a reuseport program is attached or detached. Is the issue same as Eric's patch ? https://lore.kernel.org/netdev/20261106084300.2029567-1-edumazet@kernel.org/
Technical Details
Message-ID:
<6cb5fe89-c6f0-4e84-b753-4425b1aebe1e@linux.dev>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358306-linux-kernel-netdev=dewy.ruReferences:
<20261106135841.418-1-ljp1205831794@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358306-linux-kernel-netdev=dewy.ru From: jiayuan.chen@linux.dev (Jiayuan Chen) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: reuseport: avoid duplicate closed socket insertion Date: Sat, 7 Nov 2026 13:02:23 +0800 Organization: Usenet Network Message-ID: <6cb5fe89-c6f0-4e84-b753-4425b1aebe1e@linux.dev> References: <20261106135841.418-1-ljp1205831794@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="4043390"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:fJ7AekI/zupv1pzdTfIOwYbF2J0= sha256:b49B4l5hU6PNYqqV6ekSWj2EoiUpmrIKSONrQPAkD6U= sha1:GrhIQLrmD+pioKCkLQjmZKDFOXU= sha256:b6qySWmq6fdRerMPdG3nYKxgH4VYXe2YICAktsVPDE8= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 591501133BE; Sat, 7 Nov 2026 08:04:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.05 X-Spam-Status: No, score=-2.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HK_RANDOM_FROM=1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YDRp4eHoAtok; Sat, 7 Nov 2026 08:04:27 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358306-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id A30881133BB; Sat, 7 Nov 2026 08:04:18 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 224E13CD7D; Sat, 7 Nov 2026 05:02:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794027754; b=xoDFEBg96SOcgu2OCjhuNTCYVMHScpsirUgcNgv8TmyBJ9TdVmNOvZQftmUELE2HVjm2 CW0Mw2B1kOI84KPIuE5xdNwBg/BQA1IfDj19qHQAixGH9qsAZV2yr1amldDxcmrXibCWo lTQD9DFF+T9hX9KeVoudgnhMKYG2MB4JfrK39EEeoqacN1DDPh2oBuIanQWX3QVav6YjT gQDpBeo3qhbR15w2Xm97BF7Y2OO1XVfPa9fuzomJMhDXErQ+Lu0VYKqwXW+nyaBLpVLXR DkINbLZfeaLVVe3NCP1SGnQRNNEnDqy+g3Uo00IG5jijraVhgkntO5SUk0IGzq+WHKg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794027754; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=n3tYryr7zzQ8LqyZ0K7pIJBeJLogxInZJgVPz9lzEuI=; b=3gG2Jmt/48PKLLiw9iWhoLMv7drmLDQWYL/q6wUtzR9F9dBDlTa+DUtIXqyVC8B9nFbt FTX0f1lO6JryN/K6ZxR/YN6oHuDt+NKTLegDIKrUFNpmRmcqgYnoZvPxKM9UZijIar62V GeDT+AJ+IeyH9GgNh7aQvWaHOASZx8hQS/o3tPib7/9pcZyZiz84Dk/g162Ghh2JR6nKK 1HUK2bb02v3WY+6MLXj3z0yhUuYPTm3l0wTVtQP9qAIQzE8TRId9uKBwDd3B0Afew71xE rmSRdzTBSOifPw8+3MSaI5r6ARRDWVfNIt3QM5Md2L90qlqxzzMn69viXtebMdH3M6A== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WZ96zvVG; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E753E606A335; Sat, 7 Nov 2026 05:02:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=WZ96zvVG X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.85 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794027752; b=mkgsuutHC9lF9zIoZHV4HaqmldGYlzudlxkiFwAyPaqR3jORtsUSBgQ0NPnmPz0LNXy+ n4fpnfj98ZDI30ar3MomZ+CywxEaL/uRbxVNacy5BUeVddhEjVjf0dGvKDfLAE8BVoltX X/2n7/cheEM3tDS9SOKfaSyRiFhTVRehobar6bSQPOKLpjUPcKWKSgxbriy6D72HQTE/H UIpl6OpFG9xD5v/CVKoHOsBB1axFhUeVbQYuC9UZ3GYaZRerJRZaLAApKDblRS6zrBVxn 31Ysqzb5JN55wEZPhXQFDn+NaSv9/LFTl1K9sut0UmvCLG/4rZS2NN8gwmmUxxmg96g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794027752; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=n3tYryr7zzQ8LqyZ0K7pIJBeJLogxInZJgVPz9lzEuI=; b=Wd3Q1SQw03oo2PohzeAVxRVCNORZRWquEGaM+RQntrCAeEg0ldoTBKzFchruZ5h0jSya XmBgVvBNqnY6qVswreftVbtC6qbRdqMpeIrjaqzyf96cVrVNlCHglmExn2M+f8EBhDZiT 01p9YBuRHK2jGUgS3y7kISqpPBSak44UYwQFiC6LubK1ZSvANdnIpQbQ6Qps2U+Bq27Qf iCQF/e7RaaslpHF/ozGznv7fVfd+Z+AsvT6qCwjKJdks1tD9gCR8qnERYu3PHLSE5vaN+ XVONUBo7GccRCFIslfij1RlACWxZqbNzyYoTiPj1GoSzQlUMNLE/AUPU/ZboESa7WxA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.remote-ip=95.215.58.85 X-Received: from mta1.migadu.com (out-85.mta1.migadu.com [95.215.58.85]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E93CD606A32C for <netdev@vger.kernel.org>; Sat, 7 Nov 2026 05:02:30 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E93CD606A32C X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=n3tYryr7zzQ8LqyZ0K7pIJBeJLogxInZJgVPz9lzEuI=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794027748; v=1; x=1794632548; b=WZ96zvVG3x71foE11pN/mEGy/Xu/62o9S+McTlC7mQAAKxiv1RwVW5rDjzH7CIfcKnQwS2vE hAjU3LBwvhropjwXwgCxhWsAjB1Y8JK+95hNsrxoSWTIer5iV1SWXBUFyQsUkNQKgb1HZq8xF/m ks2clnkfSx6ihUOw5AVpIeFk= X-Envelope-To: netdev@vger.kernel.org X-Received: by smtp.migadu.com with ESMTPS id 10673def8ae0b7b1; Sat, 07 Nov 2026 05:02:28 +0000 X-Mizu-Trace-ID: 10673def8ae0b7b1 X-Migadu-Flow: FLOW_OUT X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-User-Agent: Mozilla Thunderbird X-Cc: TencentOS Corvus AI <corvus@tencent.com>, stable@vger.kernel.org, Lin Jiapeng <jiapenglin@tencent.com> X-In-Reply-To: <20261106135841.418-1-ljp1205831794@gmail.com>