Forwarded: [PATCH 1/1] add lock to wait queue

syzbot
2026-04-08T12:20:10Z

Subject: [PATCH 1/1] add lock to wait queue
Author: jakovnovak30@gmail.com

#syz test

---
drivers/net/wireless/marvell/libertas/firmware.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/libertas/firmware.c b/drivers/net/wireless/marvell/libertas/firmware.c
index f124110944b7..c01180f45500 100644
--- a/drivers/net/wireless/marvell/libertas/firmware.c
+++ b/drivers/net/wireless/marvell/libertas/firmware.c
@@ -113,7 +113,9 @@ static void load_next_firmware_from_table(struct lbs_private *priv)

void lbs_wait_for_firmware_load(struct lbs_private *priv)
{
- wait_event(priv->fw_waitq, priv->fw_callback == NULL);
+ spin_lock_irqsave(&priv->driver_lock, flags);
+ wait_event_lock_irq(priv->fw_waitq, priv->fw_callback == NULL, &priv->driver_lock);
+ spin_unlock_irqrestore(&priv->driver_lock, flags);
}

/**
--
2.53.0