summaryrefslogtreecommitdiff
path: root/block/blk-ioc.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2018-05-11 17:20:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-22 19:53:57 +0300
commit27ea98a4c50c7aff5cfa132c15d6c68764b493fa (patch)
treead508b6aa88635d55643cefb80c20418c3faa594 /block/blk-ioc.c
parentb6f6d8bfe779294e58f424bff08eab9914570d9b (diff)
downloadlinux-27ea98a4c50c7aff5cfa132c15d6c68764b493fa.tar.xz
KVM: arm/arm64: VGIC/ITS: protect kvm_read_guest() calls with SRCU lock
commit bf308242ab98b5d1648c3663e753556bef9bec01 upstream. kvm_read_guest() will eventually look up in kvm_memslots(), which requires either to hold the kvm->slots_lock or to be inside a kvm->srcu critical section. In contrast to x86 and s390 we don't take the SRCU lock on every guest exit, so we have to do it individually for each kvm_read_guest() call. Provide a wrapper which does that and use that everywhere. Note that ending the SRCU critical section before returning from the kvm_read_guest() wrapper is safe, because the data has been *copied*, so we don't need to rely on valid references to the memslot anymore. Cc: Stable <stable@vger.kernel.org> # 4.8+ Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Christoffer Dall <christoffer.dall@arm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-ioc.c')
0 files changed, 0 insertions, 0 deletions