From: Qiujun Huang Date: Wed, 25 Mar 2020 07:06:46 +0000 (+0800) Subject: staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a1f165a6b738f0c9d744bad4af7a53909278f5fc;p=openwrt%2Fstaging%2Fblogic.git staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb We should cancel hw->usb_work before kfree(hw). Reported-by: syzbot+6d2e7f6fa90e27be9d62@syzkaller.appspotmail.com Signed-off-by: Qiujun Huang Cc: stable Link: https://lore.kernel.org/r/1585120006-30042-1-git-send-email-hqjagain@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/prism2usb.c b/drivers/staging/wlan-ng/prism2usb.c index 352556f6870a..4689b2170e4f 100644 --- a/drivers/staging/wlan-ng/prism2usb.c +++ b/drivers/staging/wlan-ng/prism2usb.c @@ -180,6 +180,7 @@ static void prism2sta_disconnect_usb(struct usb_interface *interface) cancel_work_sync(&hw->link_bh); cancel_work_sync(&hw->commsqual_bh); + cancel_work_sync(&hw->usb_work); /* Now we complete any outstanding commands * and tell everyone who is waiting for their