Re: [PATCH net-next 6/6] net: document NETDEV_UNREGISTER unlocked rationale
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-06-30 23:43:37
From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-06-30 23:43:37
On Tue, 30 Jun 2026 11:21:29 -0700 Stanislav Fomichev wrote:
+Many ``NETDEV_UNREGISTER`` handlers release their lowers with +``dev_close()``, which takes the instance lock itself. Holding +the lock across UNREGISTER would deadlock. + +Moving UNREGISTER under the lock is mechanical: switch those +callers to the ``netif_*()`` lock-held variants. Deferred to +limit churn.
Not following TBH. Let's say there's a UNREGISTER ntf for eth0. Are you saying that eg. vlan which closes their own vlan0 devices on top of eth0 needs to be switched to netif_ ? That wouldn't make sense since the notification is holding netdev_lock(eth0) and we're talking about netif_close(vlan0)? Doing anything with the device that is sending the UNREGISTER sounds odd, since it's going away..