On Tue, Mar 28, 2023 at 11:59:48PM +0900, Tetsuo Handa wrote: > Without this patch, __ib_unregister_device(device) is not called because > enable_device_and_get() returns 0 because add_client_context() returns 0 > because add_client_context() ignores client->add() faiulures. As a result, > device's refcount remains 7, which later prevents unregister_netdevice() > from unregistering this device. That is completely correct, the device was successfully registered without one of the clients. It seems to me all this has done done is make it so the device doesn't register and that will hide the refcount bug because the bug is actually something that happens during operation - and we never get to operation now. Jason