From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+9921e319bd6168140b40@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [fuse?] WARNING: refcount bug in process_scheduled_works
Date: Wed, 30 Jul 2025 16:24:03 +0800 [thread overview]
Message-ID: <20250730082404.3487-1-hdanton@sina.com> (raw)
In-Reply-To: <68894408.a00a0220.26d0e1.0012.GAE@google.com> (raw)
> Date: Tue, 29 Jul 2025 14:58:32 -0700 [thread overview]
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: ced1b9e0392d Merge tag 'ata-6.17-rc1' of git://git.kernel...
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=15c89782580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=d51af648924b64c9
> dashboard link: https://syzkaller.appspot.com/bug?extid=9921e319bd6168140b40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=177f7034580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=165e44a2580000
#syz test
--- x/drivers/md/md.c
+++ y/drivers/md/md.c
@@ -632,10 +632,13 @@ static void mddev_delayed_delete(struct
static void __mddev_put(struct mddev *mddev)
{
+ struct kobject *kobj = &mddev->kobj;
+
if (mddev->raid_disks || !list_empty(&mddev->disks) ||
mddev->ctime || mddev->hold_active)
return;
+ BUG_ON(kref_read(&kobj->kref) < 1);
/*
* Call queue_work inside the spinlock so that flush_workqueue() after
* mddev_find will succeed in waiting for the work to be done.
@@ -5983,6 +5986,7 @@ struct mddev *md_alloc(dev_t dev, char *
goto out_put_disk;
kobject_init(&mddev->kobj, &md_ktype);
+ kobject_get(&mddev->kobj);
error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md");
if (error) {
/*
--
next prev parent reply other threads:[~2025-07-30 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 21:58 [syzbot] [fuse?] WARNING: refcount bug in process_scheduled_works syzbot
2025-07-30 2:03 ` Hillf Danton
2025-07-30 5:16 ` syzbot
2025-07-30 8:24 ` Hillf Danton [this message]
2025-07-30 10:06 ` syzbot
2025-07-30 8:36 ` Hillf Danton
2025-07-30 10:26 ` 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=20250730082404.3487-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+9921e319bd6168140b40@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