Skip to content

Commit 19fb5fa

Browse files
fyin1wenlingz
authored andcommitted
dm: adjust the sequence of destroy client and wait for vm_loop exit
To fix the issue that watchdog reset hang issue. At previous change, we assume the reset comes from guest. But watchdog reset or dm killed by signal is different. It's possible the vm_loop stick on ioreq attaching. The new fixing has two parts: - fixing from kernel side to remove the race issue in ioreq attach, req_complete_notify and client destory. - Move the client destroy before waiting of vm_loop exit. Tracked-On: #1986 Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Reviewed-by: Liu Shuo <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
1 parent bff592d commit 19fb5fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

devicemodel/core/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ delete_cpu(struct vmctx *ctx, int vcpu)
289289
exit(1);
290290
}
291291

292-
pthread_join(mt_vmm_info[0].mt_thr, NULL);
293292
vm_destroy_ioreq_client(ctx);
293+
pthread_join(mt_vmm_info[0].mt_thr, NULL);
294294

295295
CPU_CLR_ATOMIC(vcpu, &cpumask);
296296
return CPU_EMPTY(&cpumask);

0 commit comments

Comments
 (0)