address_space_map: address_space_to_flatview needs RCU lock
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 4 Mar 2018 23:23:26 +0000 (00:23 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Mar 2018 13:01:28 +0000 (14:01 +0100)
commitad0c60fa572d4050255b698ecdb67294dd4c0125
treef2c62ef3e417aa683f441fda7cbc598ea0a1849d
parent11e732a5ed46903f997985bed4c3767ca28a7eb6
address_space_map: address_space_to_flatview needs RCU lock

address_space_map is calling address_space_to_flatview but it can
be called outside the RCU lock.  The function itself is calling
rcu_read_lock/rcu_read_unlock, just in the wrong place, so the
fix is easy.

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