address_space_read: address_space_to_flatview needs RCU lock
commitb2a44fcad74f1cc7a6786d38eba7db12ab2352ba
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 4 Mar 2018 23:19:49 +0000 (5 00:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Mar 2018 13:01:28 +0000 (6 14:01 +0100)
tree347a7383e68978e8c7136331e629592d51de72b0
parent4c6ebbb364aa6f42c5d8e83e932e967eb83f0e44
address_space_read: address_space_to_flatview needs RCU lock

address_space_read is calling address_space_to_flatview but it can
be called outside the RCU lock.  To fix it, push the rcu_read_lock/unlock
pair up from flatview_read_full to address_space_read's constant size
fast path and address_space_read_full.

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c
include/exec/memory.h