stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "md: unlock mddev_lock on an error path." has been added to the 4.1-stable tree
@ 2015-07-31  0:20 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-07-31  0:20 UTC (permalink / raw)
  To: neilb, gregkh, neilb; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    md: unlock mddev_lock on an error path.

to the 4.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     md-unlock-mddev_lock-on-an-error-path.patch
and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 9a8c0fa861e4db60409b4dda254cef5e17e4d43c Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Thu, 25 Jun 2015 17:06:40 +1000
Subject: md: unlock mddev_lock on an error path.

From: NeilBrown <neilb@suse.de>

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 <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 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)


Patches currently in stable-queue which might be from neilb@suse.de are

queue-4.1/md-clear-mddev-private-when-it-has-been-freed.patch
queue-4.1/md-fix-a-build-warning.patch
queue-4.1/md-unlock-mddev_lock-on-an-error-path.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-07-31  0:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31  0:20 Patch "md: unlock mddev_lock on an error path." has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).