staging: wlan-ng: fix ODEBUG bug in prism2sta_disconnect_usb
authorQiujun Huang <hqjagain@gmail.com>
Wed, 25 Mar 2020 07:06:46 +0000 (15:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 12:40:14 +0000 (13:40 +0100)
We should cancel hw->usb_work before kfree(hw).

Reported-by: syzbot+6d2e7f6fa90e27be9d62@syzkaller.appspotmail.com
Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1585120006-30042-1-git-send-email-hqjagain@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2usb.c

index 352556f6870a78f7f23b75af147513037fe45926..4689b2170e4fa3d01de25c695c1ae5980e6f8d92 100644 (file)
@@ -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