Re: [char-misc-next] mei: bus: fix device leak

From: Greg Kroah-Hartman
Date: Tue Jun 24 2025 - 05:06:49 EST


On Tue, Jun 24, 2025 at 10:15:21AM +0300, Alexander Usyskin wrote:
> The bus rescan function creates bus devices for all clients.
> The fixup routine is executed on all devices, unneeded
> devices are removed and fully initialized once set
> is_added flag to 1.
>
> If link to firmware is reset right after all devices are
> initialized, but before fixup is executed, the rescan tries
> to remove devices.
> The is_added flag is not set and the mei_cl_bus_dev_destroy
> returns prematurely.
> Allow to clean up device when is_added flag is unset to
> account for above scenario.
>
> Signed-off-by: Alexander Usyskin <alexander.usyskin@xxxxxxxxx>

What commit id does this fix?

thanks,

greg k-h