[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240514232319.3252-1-hdanton@sina.com>
Date: Wed, 15 May 2024 07:23:19 +0800
From: Hillf Danton <hdanton@...a.com>
To: syzbot <syzbot+2f44671e54488d20f0e6@...kaller.appspotmail.com>
Cc: linux-kernel@...r.kernel.org,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [kernfs?] [usb?] WARNING in kernfs_get (5)
On Tue, 14 May 2024 08:44:43 -0700
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 26dd54d03cd9 Add linux-next specific files for 20240514
> git tree: linux-next
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=14b06900980000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 26dd54d03cd9
--- l/drivers/base/firmware_loader/fallback.c
+++ f/drivers/base/firmware_loader/fallback.c
@@ -83,15 +83,15 @@ static int fw_load_sysfs_fallback(struct
dev_set_uevent_suppress(f_dev, true);
+ mutex_lock(&fw_lock);
+
retval = device_add(f_dev);
if (retval) {
dev_err(f_dev, "%s: device_register failed\n", __func__);
goto err_put_dev;
}
- mutex_lock(&fw_lock);
if (fw_load_abort_all || fw_state_is_aborted(fw_priv)) {
- mutex_unlock(&fw_lock);
retval = -EINTR;
goto out;
}
@@ -120,10 +120,12 @@ static int fw_load_sysfs_fallback(struct
} else if (fw_priv->is_paged_buf && !fw_priv->data)
retval = -ENOMEM;
+ mutex_lock(&fw_lock);
out:
device_del(f_dev);
err_put_dev:
put_device(f_dev);
+ mutex_unlock(&fw_lock);
return retval;
}
--
Powered by blists - more mailing lists