[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180319180756.864287271@linuxfoundation.org>
Date: Mon, 19 Mar 2018 19:06:42 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Zhilong Liu <zlliu@...e.com>,
Guoqing Jiang <gqjiang@...e.com>, Shaohua Li <shli@...com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.9 137/241] md.c:didnt unlock the mddev before return EINVAL in array_size_store
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhilong Liu <zlliu@...e.com>
[ Upstream commit b670883bb9e55ba63a278d83e034faefc01ce2cf ]
md.c: it needs to release the mddev lock before
the array_size_store() returns.
Fixes: ab5a98b132fd ("md-cluster: change array_sectors and update size are not supported")
Signed-off-by: Zhilong Liu <zlliu@...e.com>
Reviewed-by: Guoqing Jiang <gqjiang@...e.com>
Signed-off-by: Shaohua Li <shli@...com>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/md/md.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4826,8 +4826,10 @@ array_size_store(struct mddev *mddev, co
return err;
/* cluster raid doesn't support change array_sectors */
- if (mddev_is_clustered(mddev))
+ if (mddev_is_clustered(mddev)) {
+ mddev_unlock(mddev);
return -EINVAL;
+ }
if (strncmp(buf, "default", 7) == 0) {
if (mddev->pers)
Powered by blists - more mailing lists