]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: Disable irq while unregistering user notifier
authorIgnacio Alvarado <ikalvarado@google.com>
Wed, 28 Feb 2018 11:09:31 +0000 (11:09 +0000)
committerJack Vogel <jack.vogel@oracle.com>
Fri, 2 Mar 2018 01:00:40 +0000 (17:00 -0800)
commitf1e015ab372d9a6fe2f8381e39262e4cff895b84
tree2ffe9f04f9b2899c127262b20f3da1a6c0ba22b5
parent6b2806555e146606ed6539c2ab7d1871d1ddaef8
KVM: Disable irq while unregistering user notifier

Function user_notifier_unregister should be called only once for each
registered user notifier.

Function kvm_arch_hardware_disable can be executed from an IPI context
which could cause a race condition with a VCPU returning to user mode
and attempting to unregister the notifier.

Signed-off-by: Ignacio Alvarado <ikalvarado@google.com>
Cc: stable@vger.kernel.org
Fixes: 18863bdd60f8 ("KVM: x86 shared msr infrastructure")
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry picked from commit 1650b4ebc99da4c137bfbfc531be4a2405f951dd)

OraBug: 27623575
Signed-off-by: Allan Xavier <allan.x.xavier@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/kvm/x86.c