mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
rcu_queue: use atomic_set in QLIST_REMOVE_RCU
To avoid undefined behaviour. Signed-off-by: Emilio G. Cota <cota@braap.org> Message-Id: <20180819091335.22863-2-cota@braap.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
db7196db5d
commit
c177e0bf06
@ -112,7 +112,7 @@ extern "C" {
|
||||
(elm)->field.le_next->field.le_prev = \
|
||||
(elm)->field.le_prev; \
|
||||
} \
|
||||
*(elm)->field.le_prev = (elm)->field.le_next; \
|
||||
atomic_set((elm)->field.le_prev, (elm)->field.le_next); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/* List traversal must occur within an RCU critical section. */
|
||||
|
Loading…
Reference in New Issue
Block a user