From b3cb7a53d40be7d0fcd63f08923fde9d9413a9c5 Mon Sep 17 00:00:00 2001 From: Manisha Chinthapally Date: Thu, 25 Oct 2018 10:14:00 -0700 Subject: [PATCH] Fix to kernel hang in smp_call_function smp_call_function: smp_call_mask can be modified by more than one process which can cause kernel hang and timeout Adding a lock to smp_call_mask to prevent race condition Tracked-On: #1606 Acked-by: Xu, Anthony Signed-off-by: Manisha Chinthapally --- hypervisor/arch/x86/notify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/arch/x86/notify.c b/hypervisor/arch/x86/notify.c index e49417148..6b869f759 100644 --- a/hypervisor/arch/x86/notify.c +++ b/hypervisor/arch/x86/notify.c @@ -25,7 +25,7 @@ static void kick_notification(__unused uint32_t irq, __unused void *data) if (smp_call->func != NULL) { smp_call->func(smp_call->data); } - bitmap_clear_nolock(pcpu_id, &smp_call_mask); + bitmap_clear_lock(pcpu_id, &smp_call_mask); } }