Forwarded: [PATCH] Test for a forgotten shrink_stripes in the grow_stripes.
From: syzbot
Date: Sun Sep 27 2026 - 09:07:52 EST
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: [PATCH] Test for a forgotten shrink_stripes in the grow_stripes.
Author: nsvatoslav515@xxxxxxxxx
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6812ce4e4379
Signed-off-by: Svyatoslav Nikolenko <nsvatoslav515@xxxxxxxxx>
---
drivers/md/raid5.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index b91545ce090d..326409ca0cfb 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0-or-later
+/// SPDX-License-Identifier: GPL-2.0-or-later
/*
* raid5.c : Multiple Devices driver for Linux
* Copyright (C) 1996, 1997 Ingo Molnar, Miguel de Icaza, Gadi Oxman
@@ -2441,9 +2441,12 @@ static int grow_stripes(struct r5conf *conf, int num)
conf->pool_size = devs;
while (num--)
if (!grow_one_stripe(conf, GFP_KERNEL))
- return 1;
+ goto err;
return 0;
+err:
+ shrink_stripes(conf);
+ return 1;
}
/**
--
2.47.3