Re: [PATCH] net: Fix memory corruption in eth_halt() if the stop handler frees the priv member

2022-12-12 Thread Fabio Estevam
Hi Bernhard, On Mon, Dec 12, 2022 at 6:12 PM Bernhard Rosenkränzer wrote: > > Calling eth_halt() could result in memory corruption if the stop() > handler frees or modifies the priv member. > > A stored value of dev_get_uclass_priv() is assumed to remain valid > after the stop() handler has been

[PATCH] net: Fix memory corruption in eth_halt() if the stop handler frees the priv member

2022-12-12 Thread Bernhard Rosenkränzer
Calling eth_halt() could result in memory corruption if the stop() handler frees or modifies the priv member. A stored value of dev_get_uclass_priv() is assumed to remain valid after the stop() handler has been called, which is not always the case (e.g. rndis over usb gadget). Re-check the priv