[PATCH] fix: segfault when killing subarray of non-existentcontainer

[PATCH] fix: segfault when killing subarray of non-existentcontainer

am 01.08.2011 17:33:06 von anna.czarnowska

From 9c3c974e1e047caf3434f98e183e58ed3b222396 Mon Sep 17 00:00:00 2001
From: Anna Czarnowska
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
---
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] fix: segfault when killing subarray of non-existent container

am 05.08.2011 23:44:45 von dan.j.williams

On Mon, Aug 1, 2011 at 8:33 AM, Czarnowska, Anna
wrote:
> From 9c3c974e1e047caf3434f98e183e58ed3b222396 Mon Sep 17 00:00:00 2001
> From: Anna Czarnowska
> 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

Reviewed-by: Dan Williams
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] fix: segfault when killing subarray of non-existentcontainer

am 07.09.2011 06:10:15 von NeilBrown

On Fri, 5 Aug 2011 14:44:45 -0700 Dan Williams
wrote:

> On Mon, Aug 1, 2011 at 8:33 AM, Czarnowska, Anna
> wrote:
> > From 9c3c974e1e047caf3434f98e183e58ed3b222396 Mon Sep 17 00:00:00 2001
> > From: Anna Czarnowska
> > 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
>
> Reviewed-by: Dan Williams


Thanks,
I have - somewhat belatedly - applied this now.

Thanks,
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html