>From 9c3c974e1e047caf3434f98e183e58ed3b222396 Mon Sep 17 00:00:00 2001 From: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> Date: Mon, 1 Aug 2011 17:23:33 +0200 Subject: [PATCH] fix: segfault when killing subarray of non-existent container Negative value must be returned to indicate error in open_subarray Signed-off-by: Anna Czarnowska <anna.czarnowska@xxxxxxxxx> --- util.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/util.c b/util.c index 55d171a..2dec9d5 100644 --- a/util.c +++ b/util.c @@ -1369,7 +1369,7 @@ int open_subarray(char *dev, char *subarray, struct supertype *st, int quiet) if (!quiet) fprintf(stderr, Name ": Couldn't open %s, aborting\n", dev); - return 2; + return -1; } st->devnum = fd2devnum(fd); -- 1.7.4 -- 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