Re: [PATCH v3] RDMA/rxe: rework per-net tunnel socket lifetime to fix refcount underflow

From: Serhat Kumral

Date: Wed Jul 08 2026 - 14:28:51 EST


Hi Yanjun,

> However, after the network namespace teardown, the associated netdevice
> is still unregistered, which
> triggers the NETDEV_UNREGISTER notifier. In rxe_notify(), this event
> eventually calls rxe_net_del() to
> remove the RDMA link.

Isn't the ordering the other way around? The netdevices of a dying
netns are unregistered by default_device_exit_batch(), a pernet
device op, while rxe_net_ops is a pernet subsys, and subsys exits
run after all device exits. So NETDEV_UNREGISTER (and the notifier's
rxe_net_del()) should have already completed before rxe_ns_exit()
destroys the mutex.

Am I missing a path where rxe_net_del() can run after rxe_ns_exit()?

Thanks,
Serhat