[PATCH 1/1] move callback

0 views
Skip to first unread message

Jakov Novak

unread,
11:38 AM (9 hours ago) 11:38 AM
to syzbot+c99d17...@syzkaller.appspotmail.com, syzkall...@googlegroups.com, Jakov Novak
#syz test

---
drivers/net/wireless/marvell/libertas/firmware.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/libertas/firmware.c b/drivers/net/wireless/marvell/libertas/firmware.c
index f124110944b7..129aed503ff0 100644
--- a/drivers/net/wireless/marvell/libertas/firmware.c
+++ b/drivers/net/wireless/marvell/libertas/firmware.c
@@ -19,13 +19,17 @@ static void lbs_fw_loaded(struct lbs_private *priv, int ret,

lbs_deb_fw("firmware load complete, code %d\n", ret);

- /* User must free helper/mainfw */
- priv->fw_callback(priv, ret, helper, mainfw);
+ /* save cb for later because it can be interrupted */
+ lbs_fw_cb cb = priv->fw_callback;

spin_lock_irqsave(&priv->driver_lock, flags);
priv->fw_callback = NULL;
wake_up(&priv->fw_waitq);
spin_unlock_irqrestore(&priv->driver_lock, flags);
+
+ /* User must free helper/mainfw */
+ cb(priv, ret, helper, mainfw);
+
}

static void do_load_firmware(struct lbs_private *priv, const char *name,
--
2.53.0

syzbot

unread,
12:12 PM (9 hours ago) 12:12 PM
to jakovn...@gmail.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+c99d17...@syzkaller.appspotmail.com
Tested-by: syzbot+c99d17...@syzkaller.appspotmail.com

Tested on:

commit: cd1be4b2 Merge tag 'thunderbolt-for-v7.1-rc1' of ssh:/..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
console output: https://syzkaller.appspot.com/x/log.txt?x=17f9874e580000
kernel config: https://syzkaller.appspot.com/x/.config?x=dd0e4d4150f9f1da
dashboard link: https://syzkaller.appspot.com/bug?extid=c99d17aa44dbdba16ad2
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch: https://syzkaller.appspot.com/x/patch.diff?x=10739cd2580000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages