multipathd: add lock protection for cli_list_status
authorChongyun Wu <wu.chongyun@h3c.com>
Wed, 7 Mar 2018 23:15:44 +0000 (00:15 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 10 Mar 2018 07:22:54 +0000 (08:22 +0100)
cli_list_status will access vecs->pathvec which should have lock
protection, otherwise might get inconsistent data or other
problem.

Signed-off-by: Chongyun Wu <wu.chongyun@h3c.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
multipathd/main.c

index 327cc19..6d502ac 100644 (file)
@@ -1212,7 +1212,7 @@ uxlsnrloop (void * ap)
        set_handler_callback(LIST+PATHS+RAW+FMT, cli_list_paths_raw);
        set_handler_callback(LIST+PATH, cli_list_path);
        set_handler_callback(LIST+MAPS, cli_list_maps);
-       set_unlocked_handler_callback(LIST+STATUS, cli_list_status);
+       set_handler_callback(LIST+STATUS, cli_list_status);
        set_unlocked_handler_callback(LIST+DAEMON, cli_list_daemon);
        set_handler_callback(LIST+MAPS+STATUS, cli_list_maps_status);
        set_handler_callback(LIST+MAPS+STATS, cli_list_maps_stats);