Patchwork [3.5.y.z,extended,stable] Patch "md: raid0: fix error return from create_stripe_zones." has been added to staging queue

mail settings
Submitter Luis Henriques
Date March 6, 2013, 3:14 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/225521/
State New
Headers show


Luis Henriques - March 6, 2013, 3:14 p.m.
This is a note to let you know that I have just added a patch titled

    md: raid0: fix error return from create_stripe_zones.

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 39944d5b70f5971cff90b942812413cb45a2fb03 Mon Sep 17 00:00:00 2001
From: NeilBrown <>
Date: Thu, 21 Feb 2013 15:36:38 +1100
Subject: [PATCH] md: raid0: fix error return from create_stripe_zones.

commit 58ebb34c49fcfcaa029e4b1c1453d92583900f9a upstream.

Create_stripe_zones returns an error slightly differently to
raid0_run and to raid0_takeover_*.

The error returned used by the second was wrong and an error would
result in mddev->private being set to NULL and sooner or later a

So never return NULL, return ERR_PTR(err), not NULL from

This bug has been present since 2.6.35 so the fix is suitable
for any kernel since then.

Signed-off-by: NeilBrown <>
Signed-off-by: Luis Henriques <>
 drivers/md/raid0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index 08e1734..06a0257 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -280,7 +280,7 @@  abort:
-	*private_conf = NULL;
+	*private_conf = ERR_PTR(err);
 	return err;