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