[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1c1d579adbf21eac09503211edc9882af5918a57.camel@infradead.org>
Date: Sat, 24 Dec 2022 10:54:14 +0000
From: David Woodhouse <dwmw2@...radead.org>
To: Paolo Bonzini <pbonzini@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org
Cc: paul@....org, seanjc@...gle.com, Michal Luczaj <mhal@...x.co>
Subject: Re: [PATCH] KVM: x86/xen: Fix SRCU/RCU usage in readers of
evtchn_ports
On Sat, 2022-12-24 at 03:53 -0500, Paolo Bonzini wrote:
> @@ -2005,19 +2009,23 @@ static bool kvm_xen_hcall_evtchn_send(struct
> kvm_vcpu *vcpu, u64 param, u64 *r)
> gpa_t gpa;
> int idx;
>
> + /*
> + * evtchnfd is protected by kvm->srcu; the idr lookup instead
> + * is protected by RCU.
> + */
> idx = srcu_read_lock(&vcpu->kvm->srcu);
> gpa = kvm_mmu_gva_to_gpa_system(vcpu, param, NULL);
> - srcu_read_unlock(&vcpu->kvm->srcu, idx);
>
I removed that srcu_read_lock() in
https://lore.kernel.org/kvm/d52040a8d46e68efd86273be66808fe4a8c70e1d.camel@infradead.org/
on the basis that this is a hypercall handler, called from the
handle_exit function, with the lock already taken.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5965 bytes)
Powered by blists - more mailing lists