wifi: libertas: add wake_up() call to properly notify
PATCH v3 1/1 wifi: libertas: add wake_up() call to properly notify
Currently, when the firmware is not fully loaded and if_usb_disconnect is called, if_usb_prog_firmware gets stuck waiting for cardp->surprise_removed or cardp->fwdnldover while lbs_remove_card also waits for the firmware loading to be completed, which never happens. This caused the reported syzbot bug. To address this, the wake_up function call can be added in the if_usb_disconnect function which notifies the if_usb_prog_firmware thread and resolves the firmware loading.
Fixes 954ee164f4f4 ("[PATCH] libertas: reorganize and simplify init sequence")
Reported-and-tested-by [email protected]
Signed-off-by Jakov Novak <[email protected]>
--- drivers/net/wireless/marvell/libertas/if_usb.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/marvell/libertas/if_usb.c +1 -0
@@ -310,6 +310,7 @@ static void if_usb_disconnect(struct usb_interface *intf)struct lbs_private *priv = cardp->priv; cardp->surprise_removed =1 ; +wake_up (&cardp->fw_wq);if (priv) {lbs_stop_card (priv);
Signature · 1 line
2.54.0