linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] VM: Fix a benign race in kicking vCPUs
@ 2021-08-21  0:04 Sean Christopherson
  2021-08-21  0:05 ` [PATCH 1/2] KVM: Clean up benign vcpu->cpu data races when " Sean Christopherson
  2021-08-21  0:05 ` [PATCH 2/2] KVM: Guard cpusmask NULL check with CONFIG_CPUMASK_OFFSTACK Sean Christopherson
  0 siblings, 2 replies; 8+ messages in thread
From: Sean Christopherson @ 2021-08-21  0:04 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: kvm, linux-kernel, Venkatesh Srinivas, Vitaly Kuznetsov,
	Sean Christopherson

Fix benign races when kicking vCPUs where the task doing the kicking can
consume a stale vcpu->cpu.  The races are benign because of the
impliciations of task migration with respect to interrupts and being in
guest mode, but IMO they're worth fixing if only as an excuse to
document the flows.

Patch 2 is a tangentially related cleanup to prevent future me from
trying to get rid of the NULL check on the cpumask parameters, which
_looks_ like it can't ever be NULL, but has a subtle edge case due to the
way CONFIG_CPUMASK_OFFSTACK=y handles cpumasks.

Sean Christopherson (2):
  KVM: Clean up benign vcpu->cpu data races when kicking vCPUs
  KVM: Guard cpusmask NULL check with CONFIG_CPUMASK_OFFSTACK

 virt/kvm/kvm_main.c | 46 ++++++++++++++++++++++++++++++++++++---------
 1 file changed, 37 insertions(+), 9 deletions(-)

-- 
2.33.0.rc2.250.ged5fa647cd-goog


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-08-26 10:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-21  0:04 [PATCH 0/2] VM: Fix a benign race in kicking vCPUs Sean Christopherson
2021-08-21  0:05 ` [PATCH 1/2] KVM: Clean up benign vcpu->cpu data races when " Sean Christopherson
2021-08-23  7:49   ` Vitaly Kuznetsov
2021-08-21  0:05 ` [PATCH 2/2] KVM: Guard cpusmask NULL check with CONFIG_CPUMASK_OFFSTACK Sean Christopherson
2021-08-23  7:54   ` Vitaly Kuznetsov
2021-08-25  4:05   ` Lai Jiangshan
2021-08-25 21:57     ` Sean Christopherson
2021-08-26 10:24       ` Vitaly Kuznetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).