Re: [PATCH v2 5/6] KVM: s390: Add missing srcu in kvm_s390_set_irq_state()
From: Christoph Schlameuss
Date: Wed Aug 19 2026 - 07:47:06 EST
On Fri Aug 14, 2026 at 6:33 PM CEST, Claudio Imbrenda wrote:
> Like kvm_s390_inject_vcpu(), kvm_s390_set_irq_state() also needs the
> kvm->srcu or the slots lock when performing the Store status operation.
>
> Fix by taking kvm->srcu in kvm_s390_set_irq_state().
>
> Fixes: ba5c1e9b6cee ("KVM: s390: interrupt subsystem, cpu timer, waitpsw")
> Fixes: 062e44a9319f ("KVM: s390: Use srcu in kvm_arch_vcpu_unlocked_ioctl()")
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
Reviewed-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>
> ---
> arch/s390/kvm/interrupt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index fc4d1f8193d9..8a251f83d323 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -3230,9 +3230,9 @@ int kvm_s390_set_irq_state(struct kvm_vcpu *vcpu, void __user *irqstate, int len
> break;
> }
> }
> -
> if (storestatus) {
> - n = kvm_s390_store_status_unloaded(vcpu, KVM_S390_STORE_STATUS_NOADDR);
> + scoped_guard(srcu, &vcpu->kvm->srcu)
> + n = kvm_s390_store_status_unloaded(vcpu, KVM_S390_STORE_STATUS_NOADDR);
> return r ? r : n;
> }
>