[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH RFC 4/4] memory: Use rcu traversal in memory_region_to_address_sp
From: |
Peter Xu |
Subject: |
[PATCH RFC 4/4] memory: Use rcu traversal in memory_region_to_address_space |
Date: |
Sat, 25 Feb 2023 11:31:41 -0500 |
memory_region_to_address_space() is the only function that walks the
address_spaces list using RCU read lock only. Use the RCU walker to
reflect that.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
softmmu/memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/softmmu/memory.c b/softmmu/memory.c
index 95cdcaeccf..0b652d9597 100644
--- a/softmmu/memory.c
+++ b/softmmu/memory.c
@@ -566,7 +566,7 @@ static AddressSpace
*memory_region_to_address_space(MemoryRegion *mr)
while (mr->container) {
mr = mr->container;
}
- QTAILQ_FOREACH(as, &address_spaces, address_spaces_link) {
+ QTAILQ_FOREACH_RCU(as, &address_spaces, address_spaces_link) {
if (mr == as->root) {
return as;
}
--
2.39.1