staging: rtl8712: handle firmware load failure
commit22e041f720e6c40af47da65ddc33678ec9767c55
authorRustam Kovhaev <rkovhaev@gmail.com>
Thu, 16 Jul 2020 15:13:26 +0000 (16 08:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:48:08 +0000 (11 15:48 +0200)
tree142fe61c2c74fec86b2fa2a96b7d0de1cca55485
parent7fa3a6e9061c1ac4824341e71b5abbc3b48a263d
staging: rtl8712: handle firmware load failure

commit b4383c971bc5263efe2b0915ba67ebf2bf3f1ee5 upstream.

when firmware fails to load we should not call unregister_netdev()
this patch fixes a race condition between rtl871x_load_fw_cb() and
r871xu_dev_remove() and fixes the bug reported by syzbot

Reported-by: syzbot+80899a8a8efe8968cde7@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=80899a8a8efe8968cde7
Signed-off-by: Rustam Kovhaev <rkovhaev@gmail.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200716151324.1036204-1-rkovhaev@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/hal_init.c
drivers/staging/rtl8712/usb_intf.c