Article View: linux.kernel.netdev
Article #7829Re: [PATCH net] net: tun: hold napi_mutex when deleting NAPI in tun_detach_all()
From: patchwork-bot+netdevbpf
Date: Tue, 27 Oct 2026 09:40
Date: Tue, 27 Oct 2026 09:40
27 lines
8924 bytes
8924 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 22 Oct 2026 08:26:48 -0700 you wrote:
> With IFF_NAPI_FRAGS, tun_get_user() takes tfile->napi_mutex, gets the
> skb from napi_get_frags() and copies the user data into it before it
> enters the RCU read-side section around napi_gro_frags().
>
> tun_detach_all() waits with synchronize_net() and then calls
> tun_napi_del() without napi_mutex. netif_napi_del() frees napi->skb
> through napi_free_frags(). A writer that is still copying has not yet
> entered its RCU section, so synchronize_net() does not wait for it, and
> deleting the device frees the skb while the writer is using it:
>
> [...]
Here is the summary with links:
- [net] net: tun: hold napi_mutex when deleting NAPI in tun_detach_all()
https://git.kernel.org/netdev/net/c/6c799b4998c8
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID:
<179309400557.3688860.951211168435363811.git-patchwork-notify@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352331-linux-kernel-netdev=dewy.ruReferences:
<179268538303.70821.16548460883330758972@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-352331-linux-kernel-netdev=dewy.ru From: patchwork-bot+netdevbpf@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: tun: hold napi_mutex when deleting NAPI in tun_detach_all() Date: Tue, 27 Oct 2026 09:40:05 +0000 Organization: Usenet Network Message-ID: <179309400557.3688860.951211168435363811.git-patchwork-notify@kernel.org> References: <179268538303.70821.16548460883330758972@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1505511"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:0Rtj19RKLz/yAmV0y8M/385ag6o= sha256:j5Jjtl4nqIVZcXbAJcaXd/bPUkNBijwR3EOaXXOcUg0= sha1:Z3RGvRtk7z/vxis12rebPnBrzH8= sha256:2nFP2eI7A55ZW5omQs782UqctlcplzV7zK0H0ILnyTE= 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 7F78A125BE6; Tue, 27 Oct 2026 12:45:23 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.739 X-Spam-Status: No, score=-3.739 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org 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 IlG4ZYvNIxJp; Tue, 27 Oct 2026 12:45:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-352331-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 9D9BC125BE0; Tue, 27 Oct 2026 12:45:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 7C69931C69; Tue, 27 Oct 2026 09:40:15 +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=1793094008; b=EfC85Vgby2hCsmLKFNL/ZEgX7yQ+tOeewMDRef75MI+26cOtmnT3eNejHero+vHLcgxd Y9eqgfONyVtVktLcgUtEBsCWyD3IzR5grbE5HVz9xO6pZUmivB403aa1eProJ1vNzi+w0 azfL3r6qrOFXPCLDGQ+jItUZb2g7BC6cT/5cUomap247mF+ddG1hb3cw7kbet9VmjYKuR DHfRvMSMVGYp8tdveyjR8G/ndT9XCNyUYd05UqZM0+Clt+xyoBLR/qzrA5dkaSag/ddUv tMn3CU/rK39zag9x6/oPVrBXN74iyX4fsOtxEi/rT0RjdDlD88VR5iF5k0y+vzm2e0g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793094008; h=X-Original-To:Received:Received:DKIM-Signature:Received:Content-Type: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=Epcnjo8vKqnZr0lewtC8oalUp2ngZLe2GtkS1cOfs9E=; b=MfNXP9z8oIblhiSbWMpBzncA37zoCgQ53EZGECqOgDDa7CONY4dKLN9rBfbpFrkXl/Wx tqkz6DkCuiWSIbw3wtuKYrikW2HT+mus7luys4MBcYbMhl4oYBnyEv0EWjs3KaOwmwY0C sUB3RSEg0JEGNSrlNDbFX9eqIPRD2wiDhIXIhqBcdo3+Fa29LeBXNsGE//JDIXMJUABV7 kWTIyl5Biibw11y7Ajro9Lqa6FqPQ2m04C9mhUqxg3fvRUefCWjYE4JK+wTIBk25brO3z YIWzxmSCl9FQbZ7ryGYkx7/6YX7RoU5+QcAr9zoMlwATQ6rXozKxmwGDU2/lJyfPdPQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Z+4CJoRA; 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 7A0F960A2610; Tue, 27 Oct 2026 09:40:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Z+4CJoRA X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793094007; b=I65Kh2Jpdv3r++t9KFXTIoKcQGa6VgH07nRfYA3yLKiah3R2KZyO0xkUoqqZmczqIt5e ELBrqARBX4B556MO+lIlA85L3UwM8xoEVUUk6wheMDAUeUdYg+jQ4lpe4XC1sCEoaTxRY c6ItguCENDfo/Z3sOPD8KKH5lj1E/f3fDU59MkAZOljX6u1jAUFGuGw+yS6BJ07m5iZcs wHXblSqCpiSVCivyTfy5XNTJlx5lhElIzwBdEquieAhMo3Fn0sS1c3UTStw3Gk5C5LtM3 xb5E8sxZGm5Zu2nHcX25hD0VWt/OwnGnbD6rWbAAokz6c5k3qsZ0KeZ0eUbJMOcUkJg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793094007; h=Received:DKIM-Signature:Received:Content-Type:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=Epcnjo8vKqnZr0lewtC8oalUp2ngZLe2GtkS1cOfs9E=; b=G6Ic8V4jT8Brvd9OxXwSLwq5dbUJ27qifo2wpmEKn6wfXS5e0q+fqeexRN4CTwXPAJ1V IuYnMMrWiuOrQNVVhSAmIFnDNKUR1mdLi2sM3xQcwkWUlbM5S5ToVSMQx9zlz1Ti0Zqph SiO8njpMOFYcWHddT51OEujAr0QPVvpSzNrg7BZC16PLCA1oAMD1nrJKAfJPYov1aaWfJ SRHjvSA3AV7OIPNuPzrMQcUbwMQ54QD5dCLp7gTupADrGxpSHfzXbINYLspM3gG9Pr0XG aIgVoPvRv7VlqiPFp4L6gj43+76y7yLVxXmF1EbqXxY9VGIhCqty1xbteZyTkFYuq4Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Z+4CJoRA; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60698606A338; Tue, 27 Oct 2026 09:40:07 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7BE41F031E3; Tue, 27 Oct 2026 09:40:06 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793094006; bh=Epcnjo8vKqnZr0lewtC8oalUp2ngZLe2GtkS1cOfs9E=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=Z+4CJoRArW20/wge02oHP4DJww1ImpnrN8aXt5D30ehl6yBxihnU1Gz2cvViwuazi 6AuBYTUYs3kq8wqiFpjarHUe9tlcgvEsutz2IHr1kiG5EJSZjzlosVOTTrcZm9bZze lj6PqV9Wfa0ZoRej7sF8C006gIlku8oF85DjlD0JEk54LUGA+9dCyUyenTLuBE+ag/ pfuK7kEErOYiyX2HgdHe7WdZMwOi8TWAhKTbwEsZXl3NVyZX2UzkCklZnfbqROW8iZ oY8wXilV+DfrB41EKorTqpnOne0zXj6qG57g1K9wKL1eRuhl7FPxSSIFs00AY8i+ip E1w/mMatLIJwQ== X-Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id BE71C3AA8FF8; Tue, 27 Oct 2026 09:40:06 +0000 (UTC) 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: <179268538303.70821.16548460883330758972@gmail.com> X-Cc: willemdebruijn.kernel@gmail.com, jasowangio@gmail.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, peterpenkov96@gmail.com