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:
Emilio G. Cota 2018-08-19 05:13:25 -04:00 committed by Paolo Bonzini
parent db7196db5d
commit c177e0bf06

View File

@ -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. */