On 2023/04/01 1:23, Jason Gunthorpe wrote: > On Sat, Apr 01, 2023 at 01:19:47AM +0900, Tetsuo Handa wrote: >> I guess that either dev_net(netdev) is not appropriately initialized or >> dev_net(netdev) != &init_net is too restrictive to call ib_unregister_device_queued(). >> Where is dev_net(netdev) initialized? > > Bernard? What is this net ns check for? It seems surprising this would > be here > Commit bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") implemented siw_netdev_event() with if (dev_net(netdev) != &init_net) return NOTIFY_OK; check. But why this check is needed was not explained. Maybe ib_devices_shared_netns is relevant? Since network devices created upon/after unshare(CLONE_NEWNET) have network namespace other than init_net, this check completely disables siw_netdev_event() after unshare(CLONE_NEWNET). Thus, removing this check looks reasonable.