Re: [PATCH] driver: usb: nullify dangling pointer in cdc_ncm_free

Bjørn Mork
2022-04-19T20:26:41Z

Oliver Neukum <oneukum@suse.com> writes:

> It seems to me that fundamentally the order of actions to handle
> a hotunplug must mirror the order in a hotplug. We can add more hooks
> if that turns out to be necessary for some drivers, but the basic
> reverse mirrored order must be supported and I very much favor
> restoring it as default.

FWIW, I agree 100% with this. Please go ahead with the revert of commit
2c9d6c2b871d ("usbnet: run unbind() before unregister_netdev()").

AFAICS, your proposed new hook should solve the original problem just
fine.

Bjørn