pvck: add lock_global() before clean_hint_file() to avoid deadlock
PATCH 1/1 pvck: add lock_global() before clean_hint_file() to avoid deadlock
Hi,
I found a same problem, pvck command don't add lock_global() before clean_hint_file(), it may cause deadlock.
Signed-off-by Wu Guanghao <[email protected]>
--- tools/pvck.c | 3 +++ 1 file changed, 3 insertions(+)
tools/pvck.c +3 -0
@@ -3037,6 +3037,9 @@ int pvck(struct cmd_context *cmd, int argc, char **argv)if (arg_is_set (cmd, repairtype_ARG) ||arg_is_set (cmd, repair_ARG)) { pv_name = argv[0 ]; +if (!lock_global (cmd,"ex" )) +return ECMD_FAILED ; +clear_hint_file (cmd);if (!setup_device (cmd, pv_name)) {
Signature · 3 lines
Regards Wu Guanghao