Sascha Hauer <[email protected]> wrote:
> After rtw_usb_alloc_rx_bufs() has been called rx urbs have been
> allocated and must be freed in the error path. After rtw_usb_init_rx()
> has been called they are submitted, so they also must be killed.
>
> Add these forgotten steps to the probe error path.
>
> Besides the lost memory this also fixes a problem when the driver
> fails to download the firmware in rtw_chip_info_setup(). In this
> case it can happen that the completion of the rx urbs handler runs
> at a time when we already freed our data structures resulting in
> a kernel crash.
>
> Fixes: a82dfd33d123 ("wifi: rtw88: Add common USB chip support")
> Cc: [email protected]
> Reported-by: Ilgaz Ă–cal <[email protected]>
> Signed-off-by: Sascha Hauer <[email protected]>
> Acked-by: Larry Finger <[email protected]>
> Acked-by: Ping-Ke Shih <[email protected]>
Patch applied to wireless-next.git, thanks.
290564367ab7 wifi: rtw88: usb: kill and free rx urbs on probe failure
--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches