mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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;
>   
> 


  reply	other threads:[~2025-07-30  6:09 UTC|newest]

Thread overview: 28+ 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 --
2025-07-28 23:37 [syzbot] [bpf?] KASAN: slab-out-of-bounds Write in __bpf_get_stackid syzbot
2025-07-29  7:22 ` syztest Arnaud Lecomte
2025-07-28 20:55 [syzbot] [bpf?] KASAN: slab-out-of-bounds Write in __bpf_get_stackid syzbot
2025-09-04 10:17 ` syztest Arnaud Lecomte
2025-09-04 14:11 ` syztest Arnaud Lecomte
2025-09-04 14:47   ` syztest Jakub Kicinski
2025-09-04 14:53     ` syztest Lecomte, Arnaud
2025-07-21 18:59 [syzbot] [kernel?] KMSAN: kernel-infoleak in do_insn_ioctl syzbot
2025-07-24 20:27 ` syztest Arnaud Lecomte
2025-07-03  9:47 [syzbot] [usb?] KASAN: slab-out-of-bounds Read in mon_bin_event syzbot
2025-07-20 19:16 ` syztest Arnaud Lecomte
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
2025-04-24  2:02 [syzbot] [xfs?] KMSAN: uninit-value in xfs_dialloc_ag_inobt syzbot
2025-04-24  8:59 ` syztest Arnaud Lecomte
2025-04-24  8:59   ` syztest syzbot
2025-04-23 20:21 [syzbot] [jfs?] UBSAN: array-index-out-of-bounds in dbAllocAG syzbot
2025-04-23 21:47 ` syztest Arnaud Lecomte
2025-04-10  6:58 [syzbot] [bcachefs?] kernel BUG in __bch2_str_hash_check_key syzbot
2025-04-28 16:09 ` syztest Arnaud Lecomte
2025-04-28 16:26   ` syztest Kent Overstreet
2025-03-31 20:23 [syzbot] [rdma?] [s390?] [net?] KASAN: null-ptr-deref Read in smc_tcp_syn_recv_sock syzbot
2025-06-29 13:29 ` syztest Arnaud Lecomte
2025-06-30  6:51   ` syztest Paolo Abeni
2025-06-29 14:47 ` syztest Arnaud Lecomte
2025-06-29 15:10 ` syztest Arnaud Lecomte
2024-12-06 20:05 [syzbot] [input?] [usb?] KASAN: slab-out-of-bounds Read in mcp2221_raw_event syzbot
2025-07-26 20:41 ` syztest Arnaud Lecomte
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

all inboxes | Powered by JetHome®