# Re: \[PATCH wireless-drivers\] mt7601u: fix kernel crash unplugging the device

- From: Lorenzo Bianconi \<hidden\>
- Date: 2021-01-18 23:32:11 
- List: linux-wireless
- Page: https://ratatoskr.run/linux-wireless/2021/01/15765564
- Thread: https://ratatoskr.run/linux-wireless/2021/01/15765547/t.md

```text
> On Sun, 17 Jan 2021 22:46:01 +0100 Lorenzo Bianconi wrote:
> > Fix the following kernel crash unplugging the usb dongle
> >
> > [...]
> >
> > Fixes: 23377c200b2eb ("mt7601u: fix possible memory leak when the device is disconnected")
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
>
> A few words of explanation beyond the stack trace without line info
> would perhaps make the review quicker..
>

Hi Jakub,

right, sorry for that. I will add some more info here so Kalle can add
it to the commit log merging the patch.

"
The following crash log can occur unplugging the usb dongle since,
after the urb poison in mt7601u_free_tx_queue(), usb_submit_urb() will
always fail resulting in a skb kfree while the skb has been already
queued.
Fix the issue enqueuing the skb only if usb_submit_urb() succeed.
"

@Kalle: is it ok or do you prefer to resubmit? (sorry for the noise)

Regards,
Lorenzo




>
> Acked-by: Jakub Kicinski <redacted>
>

```
