From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+6616bba359cec7a1def1@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [kernel?] WARNING in driver_unregister (2)
Date: Sat, 5 Jul 2025 16:18:49 +0800 [thread overview]
Message-ID: <20250705081850.2552-1-hdanton@sina.com> (raw)
In-Reply-To: <68689a02.a00a0220.c7b3.002c.GAE@google.com>
> Date: Fri, 04 Jul 2025 20:20:34 -0700
> syzbot found the following issue on:
>
> HEAD commit: c435a4f487e8 Merge tag 'riscv-for-linus-6.16-rc5' of git:/..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=138f8f70580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=5ba6cef8f153bfeb
> dashboard link: https://syzkaller.appspot.com/bug?extid=6616bba359cec7a1def1
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10b8febc580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=118f6c8c580000
#syz test
--- x/drivers/comedi/drivers.c
+++ y/drivers/comedi/drivers.c
@@ -994,10 +994,13 @@ int comedi_device_attach(struct comedi_d
dev->board_name = dev->board_ptr ? *(const char **)dev->board_ptr
: dev->driver->driver_name;
ret = driv->attach(dev, it);
- if (ret >= 0)
+ if (ret >= 0) {
ret = comedi_device_postconfig(dev);
- if (ret < 0) {
- comedi_device_detach(dev);
+ if (ret < 0) {
+ comedi_device_detach(dev);
+ module_put(driv->module);
+ }
+ } else {
module_put(driv->module);
}
/* On success, the driver module count has been incremented. */
--
next prev parent reply other threads:[~2025-07-05 8:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-05 3:20 [syzbot] [kernel?] WARNING in driver_unregister (2) syzbot
2025-07-05 8:18 ` Hillf Danton [this message]
2025-07-05 8:38 ` syzbot
2025-10-22 14:13 ` Forwarded: " syzbot
[not found] <5499f25e-99fc-4720-8d5b-a6606aad6d6a@mev.co.uk>
2025-10-22 21:31 ` [syzbot] [kernel?] " syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250705081850.2552-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+6616bba359cec7a1def1@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox