4.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: NeilBrown <[email protected]>

commit 9a8c0fa861e4db60409b4dda254cef5e17e4d43c upstream.

This error path retuns while still holding the lock - bad.

Fixes: 6791875e2e53 ("md: make reconfig_mutex optional for writes to md sysfs 
files.")
Signed-off-by: NeilBrown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/md/md.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4005,8 +4005,10 @@ new_dev_store(struct mddev *mddev, const
        else
                rdev = md_import_device(dev, -1, -1);
 
-       if (IS_ERR(rdev))
+       if (IS_ERR(rdev)) {
+               mddev_unlock(mddev);
                return PTR_ERR(rdev);
+       }
        err = bind_rdev_to_array(rdev, mddev);
  out:
        if (err)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to