mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 15:14:18 +08:00
be82abe6a7
The kvm_riscv_check_vcpu_requests() is called with SRCU read lock held
and for KVM_REQ_SLEEP request it will block the VCPU without releasing
SRCU read lock. This causes KVM ioctls (such as KVM_IOEVENTFD) from
other VCPUs of the same Guest/VM to hang/deadlock if there is any
synchronize_srcu() or synchronize_srcu_expedited() in the path.
To fix the above in kvm_riscv_check_vcpu_requests(), we should do SRCU
read unlock before blocking the VCPU and do SRCU read lock after VCPU
wakeup.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
main.c | ||
Makefile | ||
mmu.c | ||
tlb.c | ||
vcpu_exit.c | ||
vcpu_fp.c | ||
vcpu_sbi_base.c | ||
vcpu_sbi_hsm.c | ||
vcpu_sbi_replace.c | ||
vcpu_sbi_v01.c | ||
vcpu_sbi.c | ||
vcpu_switch.S | ||
vcpu_timer.c | ||
vcpu.c | ||
vm.c | ||
vmid.c |