Re: [PATCH net v2] ipvlan: keep lower device alive until private destruction
Krystian Kaniewski <[email protected]>
| Newsgroups | dev.linux.lists.syzbot,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
You're right. I treated the netdev reference as a guarantee that the device was still usable, while it only keeps struct net_device allocated. It does not guarantee that the device is still operational after unregister has started. Keeping the lower device referenced for longer in ipvlan is therefore not the right solution. The caller that wants to operate on the device needs to verify that it is still alive. Thank you for the review and for clarifying this. I will prepare a v3 later with the fix on the caller side. On 8/6/2026 5:38 PM, Jakub Kicinski wrote: > On Mon, 3 Aug 2026 14:11:39 +0200 Krystian Kaniewski wrote: >> Specifically, RXE acts as an asynchronous owner in this scenario. RXE >> queues RDMA device removal on NETDEV_UNREGISTER, meaning it can retain a >> reference to the ipvlan netdev after ndo_uninit has completed. > The netdev reference only guarantees that struct net_device does not > go away. Caller must check that the device is still alive if it is > trying to operate on it without a guarantee that it's still live.