From: "Chen Cheng" <chencheng@fnnas.com>
To: <linux-raid@vger.kernel.org>, <yukuai@fygo.io>, <nixiao@fygo.io>
Cc: <chencheng@fnnas.com>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 0/2] md/raid5: validate disk count before reshape assembly
Date: Mon, 14 Sep 2026 20:17:45 +0800 [thread overview]
Message-ID: <cover.1789387793.git.chencheng@fnnas.com> (raw)
From: Chen Cheng <chencheng@fnnas.com>
The previous patch rejects raid4/5 arrays with too few disks in
setup_conf(). During reshape assembly, raid5_run() still divides by the
data-disk count before that check, so a crafted superblock can hit
division by zero.
Extract min_raid_disks() and reject invalid reshape geometries in
raid5_run() first.
Chen Cheng (2):
md/raid5: extract min_raid_disks()
md/raid5: reject invalid reshape disks in raid5_run()
drivers/md/raid5.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
--
2.55.0
next reply other threads:[~2026-09-14 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 12:17 Chen Cheng [this message]
2026-09-14 12:17 ` [PATCH v1 1/2] md/raid5: extract min_raid_disks() Chen Cheng
2026-09-14 12:17 ` [PATCH v1 2/2] md/raid5: reject invalid reshape disks in raid5_run() Chen Cheng
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=cover.1789387793.git.chencheng@fnnas.com \
--to=chencheng@fnnas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=nixiao@fygo.io \
--cc=yukuai@fygo.io \
/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®