bcache: not exposing userspace interface until ready
PATCH 1/1 bcache: not exposing userspace interface until ready
As Coly pointed out, bcache_exit() may not be able to handle all the references properly, if userspace registers cache and backing devices right before bch_debug_init and bch_debug_init failes later.
Signed-off-by Liang Chen <[email protected]>
--- drivers/md/bcache/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/bcache/super.c +2 -2
@@ -2104,9 +2104,9 @@ static int __init bcache_init(void)if (!(bcache_wq =alloc_workqueue ("bcache" ,WQ_MEM_RECLAIM ,0 )) || !(bcache_kobj =kobject_create_and_add ("bcache" , fs_kobj)) || -sysfs_create_files (bcache_kobj, files) ||bch_request_init () || -bch_debug_init (bcache_kobj)) +bch_debug_init (bcache_kobj) || +sysfs_create_files (bcache_kobj, files)) goto err;return 0 ;
Signature · 1 line
1.8.3.1