Uninitialized array structure is used. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/Grow.c b/Grow.c index c568a55..6dbc3b7 100644 --- a/Grow.c +++ b/Grow.c @@ -1637,6 +1637,10 @@ static int reshape_array(char *container, int fd, char *devname, fprintf(stderr, Name ": %s\n", msg); return 1; } + if (ioctl(fd, GET_ARRAY_INFO, &array) != 0) { + dprintf("Canot get array information.\n"); + return 1; + } spares_needed = max(reshape.before.raid_disks, reshape.after.raid_disks) - array.raid_disks; -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html