From: "yu kuai" <yukuai@fygo.io>
To: "Chen Cheng" <chencheng@fnnas.com>, <linux-raid@vger.kernel.org>,
<nixiao@fygo.io>, "yu kuai" <yukuai@fygo.io>
Cc: <linux-kernel@vger.kernel.org>,
<syzbot+de94ddbfff0c9e6fe030@syzkaller.appspotmail.com>
Subject: Re: [PATCH v3] md/raid5: reject raid4/5 arrays with too few disks
Date: Sat, 12 Sep 2026 19:46:00 +0800 [thread overview]
Message-ID: <6483cd2f-a181-4e09-b9ef-8dd1d5e1885c@fygo.io> (raw)
In-Reply-To: <20260911041521.2433222-1-chencheng@fnnas.com>
在 2026/9/11 12:15, Chen Cheng 写道:
> From: Chen Cheng<chencheng@fnnas.com>
>
> raid4 and raid5 require at least two disks, while raid6 requires at least
> four disks. setup_conf() only rejects raid6 arrays with fewer than four
> disks. As a result, an invalid raid4 or raid5 array can be assembled with
> no data disks and later reach raid5_set_limits().
>
> Reject such arrays before the r5conf is created. This prevents the invalid
> geometry from reaching queue limit setup, where roundup_pow_of_two() can be
> called with a zero stripe size.
>
> Reported-by:syzbot+de94ddbfff0c9e6fe030@syzkaller.appspotmail.com
> Closes:https://lore.kernel.org/r/6a778c82.01d0871a.3a0d52.006a.GAE@google.com/
> Fixes: f63f17350e53 ("md/raid5: use the atomic queue limit update APIs")
> Signed-off-by: Chen Cheng<chencheng@fnnas.com>
> ---
> v1->v2:
> - Fix wrong tags
> - Check raid-4 also
>
> v2->v3:
> - Keep two-disk raid5 arrays valid by rejecting raid4/5 only below two disks
> ---
> drivers/md/raid5.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
Applied to md-7.3
--
Thanks,
Kuai
prev parent reply other threads:[~2026-09-12 11:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-11 4:15 [PATCH v3] md/raid5: reject raid4/5 arrays with too few disks Chen Cheng
2026-09-11 4:27 ` sashiko-bot
2026-09-12 11:45 ` yu kuai
2026-09-12 11:46 ` yu kuai [this message]
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=6483cd2f-a181-4e09-b9ef-8dd1d5e1885c@fygo.io \
--to=yukuai@fygo.io \
--cc=chencheng@fnnas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=nixiao@fygo.io \
--cc=syzbot+de94ddbfff0c9e6fe030@syzkaller.appspotmail.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