summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 7d60e1530c..0a4a0c5af6 100644
--- a/exec.c
+++ b/exec.c
@@ -954,7 +954,10 @@ hwaddr memory_region_section_get_iotlb(CPUState *cpu,
iotlb |= PHYS_SECTION_ROM;
}
} else {
- iotlb = section - section->address_space->dispatch->map.sections;
+ AddressSpaceDispatch *d;
+
+ d = atomic_rcu_read(&section->address_space->dispatch);
+ iotlb = section - d->map.sections;
iotlb += xlat;
}