]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: selftests: Always run vCPU thread with blocked SIG_IPI
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:13:03 +0000 (04:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:32 +0000 (10:49 +0200)
commit9e86be31fcd16a41ab8c0580689cbe3edaaac5e5
tree10a719c111f824996707a8242bda26efdc69cde8
parent8a804798cd81827b2c434222c280c66f83cb0bb7
KVM: selftests: Always run vCPU thread with blocked SIG_IPI

commit bf1e15a82e3b74ee86bb119d6038b41e1ed2b319 upstream.

The main thread could start to send SIG_IPI at any time, even before signal
blocked on vcpu thread.  Therefore, start the vcpu thread with the signal
blocked.

Without this patch, on very busy cores the dirty_log_test could fail directly
on receiving a SIGUSR1 without a handler (when vcpu runs far slower than main).

Reported-by: Peter Xu <peterx@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/kvm/dirty_log_test.c