summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2015-07-22 19:09:15 +0200
committerNeilBrown <neilb@suse.com>2015-07-24 05:37:51 +0200
commitb0c26a79d6993b280931f8e2b406ca4b220bb58f (patch)
tree5180d2cbe3ac691e95afc978630a4f1c8521b9c8 /drivers/md/md.c
parentmd: Skip cluster setup in case of error while reading bitmap (diff)
downloadlinux-b0c26a79d6993b280931f8e2b406ca4b220bb58f.tar.xz
linux-b0c26a79d6993b280931f8e2b406ca4b220bb58f.zip
md: Return error if request_module fails and returns positive value
request_module() can return 256 (process exited) in some cases, which is not as specified in the documentation before the request_module() definition. Convert the error to -ENOENT. The positive error number results in bitmap_create() returning a value that is meant to be an error but doesn't look like one, so it is dereferenced as a point and causes a crash. (not needed for stable as this is "experimental" code) Fixes: edb39c9deda8 ("Introduce md_cluster_operations to handle cluster functions") Signed-off-By: Goldwyn Rodrigues <rgoldwyn@suse.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to '')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 5025b3ec13cd..0fcf6de2415a 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7439,7 +7439,7 @@ int md_setup_cluster(struct mddev *mddev, int nodes)
err = request_module("md-cluster");
if (err) {
pr_err("md-cluster module not found.\n");
- return err;
+ return -ENOENT;
}
spin_lock(&pers_lock);