]> git.baikalelectronics.ru Git - kernel.git/commit
md: Return error if request_module fails and returns positive value
authorGoldwyn Rodrigues <rgoldwyn@suse.com>
Wed, 22 Jul 2015 17:09:15 +0000 (12:09 -0500)
committerNeilBrown <neilb@suse.com>
Fri, 24 Jul 2015 03:37:51 +0000 (13:37 +1000)
commit4d26fd7ca6caabb3a86d626a71b5a25a2c183ef5
tree5180d2cbe3ac691e95afc978630a4f1c8521b9c8
parent4a557436b6fad80cccab9251b311bab93d0456da
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: 22682749a218 ("Introduce md_cluster_operations to handle cluster functions")
Signed-off-By: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md.c