staging: rtl8712: handle firmware load failure
authorRustam Kovhaev <rkovhaev@gmail.com>
Thu, 16 Jul 2020 15:13:26 +0000 (08:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Aug 2020 13:35:32 +0000 (15:35 +0200)
commit3a8d0a1aa5cb13b6437f465c6e1201c23ebb0b4e
treed743613f50c2f91128b03ef9a43f3ee291472f23
parent07f332267d8189d1394b960718f87af30fed8b7a
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