From: Yu Kuai <yukuai1@huaweicloud.com>
To: Arnaud Lecomte <contact@arnaud-lcm.com>,
syzbot+fa3a12519f0d3fd4ec16@syzkaller.appspotmail.com
Cc: linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: syztest
Date: Wed, 30 Jul 2025 14:09:16 +0800 [thread overview]
Message-ID: <a166383d-a19a-deb4-e170-2350f8fdafd0@huaweicloud.com> (raw)
In-Reply-To: <20250730055126.114185-1-contact@arnaud-lcm.com>
Hi,
在 2025/07/30 13:51, Arnaud Lecomte 写道:
> #syz test
>
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -5978,10 +5978,6 @@ struct mddev *md_alloc(dev_t dev, char *name)
>
> disk->events |= DISK_EVENT_MEDIA_CHANGE;
> mddev->gendisk = disk;
> - error = add_disk(disk);
> - if (error)
> - goto out_put_disk;
> -
> kobject_init(&mddev->kobj, &md_ktype);
> error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md");
This is wrong, you can't add mddev >kobj under the disk without
kobject_add for the disk kobj.
Thanks,
Kuai
> if (error) {
> @@ -5999,6 +5995,9 @@ struct mddev *md_alloc(dev_t dev, char *name)
> kobject_uevent(&mddev->kobj, KOBJ_ADD);
> mddev->sysfs_state = sysfs_get_dirent_safe(mddev->kobj.sd, "array_state");
> mddev->sysfs_level = sysfs_get_dirent_safe(mddev->kobj.sd, "level");
> + error = add_disk(disk);
> + if (error)
> + goto out_put_disk;
> mutex_unlock(&disks_mutex);
> return mddev;
>
>
next prev parent reply other threads:[~2025-07-30 6:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-29 21:58 [syzbot] [fuse?] [block?] KASAN: slab-use-after-free Read in disk_add_events syzbot
2025-07-30 5:51 ` syztest Arnaud Lecomte
2025-07-30 6:09 ` Yu Kuai [this message]
2025-07-30 7:10 ` syztest Arnaud Lecomte
2025-07-30 8:37 ` [syzbot] [fuse?] [block?] KASAN: slab-use-after-free Read in disk_add_events syzbot
2025-07-30 6:14 ` Yu Kuai
2025-07-30 6:16 ` Yu Kuai
-- strict thread matches above, loose matches on Subject: below --
2024-01-22 9:48 [syzbot] [hfs?] KASAN: out-of-bounds Read in hfsplus_bnode_move syzbot
2025-07-27 18:17 ` syztest Arnaud Lecomte
2023-06-17 5:30 [syzbot] [hfs?] kernel BUG in hfsplus_bnode_put syzbot
2025-08-29 6:30 ` syztest Chenzhi Yang
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=a166383d-a19a-deb4-e170-2350f8fdafd0@huaweicloud.com \
--to=yukuai1@huaweicloud.com \
--cc=contact@arnaud-lcm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+fa3a12519f0d3fd4ec16@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=yukuai3@huawei.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;
as well as URLs for NNTP newsgroup(s).