On Thu, 13 Jan 2011 15:50:34 +0100 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote: > When mdadm falls in "reduce size" error on takeovered array it jumps > to release and tries execute backward takeover. This time sra pointer is not initialized > and coredump is generated. > > Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> > --- > > Grow.c | 3 +-- > 1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/Grow.c b/Grow.c > index 7cc6bae..f1a6218 100644 > --- a/Grow.c > +++ b/Grow.c > @@ -1594,7 +1594,7 @@ static int reshape_array(char *container, int cfd, int fd, char *devname, > unsigned long cache; > unsigned long long array_size; > int done; > - struct mdinfo *sra; > + struct mdinfo *sra = NULL; > int info_reloaded = 0; > > > @@ -1802,7 +1802,6 @@ static int reshape_array(char *container, int cfd, int fd, char *devname, > sra = sysfs_read(fd, 0, > GET_COMPONENT|GET_DEVS|GET_OFFSET|GET_STATE|GET_CHUNK| > GET_CACHE); > - > if (!sra) { > fprintf(stderr, Name ": %s: Cannot get array details from sysfs\n", > devname); > > -- > 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 Applied, thanks. NeilBrown -- 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