From: Arnaud Lecomte <contact@arnaud-lcm.com>
To: Yu Kuai <yukuai1@huaweicloud.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 08:10:27 +0100 [thread overview]
Message-ID: <b3310f8e-3e71-42d2-a4f6-1df2c2d294c1@arnaud-lcm.com> (raw)
In-Reply-To: <a166383d-a19a-deb4-e170-2350f8fdafd0@huaweicloud.com>
On 30/07/2025 07:09, Yu Kuai wrote:
> 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.
>
Will dive a bit more into that after work,
Thanks
> 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 7:10 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 ` syztest Yu Kuai
2025-07-30 7:10 ` Arnaud Lecomte [this message]
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 --
2025-04-25 0:57 [syzbot] [block?] BUG: unable to handle kernel NULL pointer dereference in guard_bio_eod syzbot
2025-04-27 15:57 ` syztest Arnaud Lecomte
2025-04-27 16:03 ` syztest Arnaud Lecomte
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=b3310f8e-3e71-42d2-a4f6-1df2c2d294c1@arnaud-lcm.com \
--to=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=yukuai1@huaweicloud.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