Article View: linux.kernel.netdev
Article #6409Re: [PATCH] xfrm: disable state hash resize work on netns exit
From: Florian Westphal
Date: Thu, 22 Oct 2026 10:51
Date: Thu, 22 Oct 2026 10:51
12 lines
7526 bytes
7526 bytes
Eduard Zateev <hackerowskiy@gmail.com> wrote: > xfrm_state_fini() flushes state_hash_work before it inspects and frees the > per-net state hash tables. A concurrent state insertion can queue another > resize while that flush is in progress. The resize worker may then replace > and free a table while teardown is still walking it. Is that correct? Can you explain why we can have a parallel insert while we tear down the data structures? If we have such a scenario, what prevents the insertion from happening after the disable_work_sync, or after the xfrm_hash_free() calls?
Technical Details
Message-ID:
<atnqzmyrwps9xc76@strlen.de>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350518-linux-kernel-netdev=dewy.ruReferences:
<20261022102641.1429128-1-hackerowskiy@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-350518-linux-kernel-netdev=dewy.ru From: fw@strlen.de (Florian Westphal) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH] xfrm: disable state hash resize work on netns exit Date: Thu, 22 Oct 2026 12:51:58 +0200 Organization: Usenet Network Message-ID: <atnqzmyrwps9xc76@strlen.de> References: <20261022102641.1429128-1-hackerowskiy@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="192044"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:FeNPtrQ41DDBz+8Sc4W4JBY0d7U= sha256:W9aMEbciYRO9xYKdjWrxFLuHy5qacUX8bEWRwX2kMiQ= sha1:kl5Eb0m4ykkFff4IeLXPAqHtiwo= sha256:2nmQVB8WA0mJI/9cVV1XJqDpdfZeXUwJI3SeK4UW3sw= Content-Disposition: inline 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 12356111247; Thu, 22 Oct 2026 13:52:12 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no 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 09AJOCR1OVqF; Thu, 22 Oct 2026 13:52:09 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-350518-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=strlen.de X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 9FE4A111211; Thu, 22 Oct 2026 13:52:06 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 1FFC6605FA5; Thu, 22 Oct 2026 10:52:05 +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=1792666322; b=AokEyNEi31pWMbk8STWgeSf/TVX+rpN8EMjlWTvScFza9WM762QvKZxRVMSNhxErXf4W EX+oQFKUhEYpdPjo+AL+4jU7KgAaUKl7ATFUvkZJiAb28LJVYBJe+l8TyAaxT4ugWuAt+ 3zKzJCamvrM0C0EvyNRV56XDDcVyuqs38ElFY709ro5z5ABwkysA4TCH+02uHv83ou9dY nSKZn46HfGo4++YQkzsOddZtjd23ua9Rjvlp9gXeuwi8dfI3pEK9oBwp2l/6n9qCBPXdA adKZ4x/6RU7Um1YMuLeIU/TbLQVSr4kox5NgkotPAmspFT7HvdT6SbZRFKcjUe1HFLA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792666322; h=X-Original-To:Received:DMARC-Filter:Received:Date:From:To:Cc:Subject: Message-ID:References:X-Mailing-List:List-Id:List-Post:List-Help: List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=0Fd4M8P9CGrNe3fKF6pXdZwlgw+B/jEmtEkhsHHnwy0=; b=BAsApvMR5IG0fPrur7lX4Xe0hsFBcgvhu0FuOMhELjE9Rdy11wiS4E4IjqTZzupAMtET JfMKMO/TEXbCDjlSAuAKQ9GoFSAANIitR+qF+5BMCchxqQAkL0BAMO2XgW1IcmeHj4zRs ZPXzN2bQvHRUxBlT/sUUzykfLL0BRYgNzmDcYvBUDQUCPZe9Y8ZpxFkrLx3ucMfxjKOIu I+/MTZBJYzugaJPGwlaSSrUUpQcyPUp3i4Q/5Y7V6Y3BLfiuZgRLqP+59nGpf9uiWkhU1 unXcSi419Mfj/hJ9+qIhXzqKAr+bl/JlMSRgboaV5EDoO+qB0viWKiFAqTkSEm2eQ4Q== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; 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 227E7606A324; Thu, 22 Oct 2026 10:52:02 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=91.216.245.30 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792666321; b=JI/qHnVyC6wSbCYeF45V/4qY7knqSTN/Ty4JU3nkdaLVsr3GPgm6l+GB674tDe/HSMiG G+ysbYgGLFW0kVYeuydUB1gJSdnyNEmAb/94HnEX6EawpZSn7rnD1UDkPIylWv7psnxv3 Bjhu97kBwC1pq3gz5EpZWRL27f1vr7ElIabrPIpR+oxkpbHgHUHcLMv7w1EzIdybti94m Uq3l6jHMnjKOnDzgHQxR4Tgm8fBX7QrIIVRhbT+TGlrd5l3QeRv7NwONvSRYCbk1z+fNy TVlOdgZmJeDET0ynPqYq/OZbxCCBKDz01PTf6/IlKOJt3KSF4YYvej1oIrwrL+XgT6w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792666321; h=DMARC-Filter:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=0Fd4M8P9CGrNe3fKF6pXdZwlgw+B/jEmtEkhsHHnwy0=; b=w/XWDcznG70zfGRaqDC/wBXFzfxDRLP6RQy4YFlvP3azquDNU4gd38pfr1RKuEFXqa7C 86El4TZ/ruJNL0qqtW3uKskuZIuG8kwOOdlgYnt6lpRVzKFzrFqzs07DHZbZeOgtAdVcd Q8tA4qnU3RszVqk5dqBj6n+ZdYWvzl7YsyeFIMvc0YIZTQJZEepvEjDJLQfzynMIHvTKD 9FqkRODzAwFm6goQ1/6x6HZovwrdXImXKmup4XGSryMD6QmbCy3DumKVL2KfnLOYPUA37 v3EaP6cUcCoWrVownG5iR9hRP7dUnpKjiMnCwscB3z2gbXZCp4B0nL9v4e0lLEn8CCA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.remote-ip=91.216.245.30 X-Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9753D606A31B; Thu, 22 Oct 2026 10:52:00 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9753D606A31B X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de X-Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id B9EDA61115; Thu, 22 Oct 2026 12:51:58 +0200 (CEST) X-Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+f3f4fce0609f8e91b540@syzkaller.appspotmail.com 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-In-Reply-To: <20261022102641.1429128-1-hackerowskiy@gmail.com>