diff options
| author | Emilio G. Cota <cota@braap.org> | 2018-08-19 05:13:25 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2018-08-23 18:46:25 +0200 |
| commit | c177e0bf063659427874bf78236a762b5f040546 (patch) | |
| tree | ddeabf3ca2978cb0bfb2db6ac32ef66e16a3f4b1 /include/qemu/rcu_queue.h | |
| parent | db7196db5d5d932f388643baae6835f8dcda6921 (diff) | |
| download | focaccia-qemu-c177e0bf063659427874bf78236a762b5f040546.tar.gz focaccia-qemu-c177e0bf063659427874bf78236a762b5f040546.zip | |
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>
Diffstat (limited to 'include/qemu/rcu_queue.h')
| -rw-r--r-- | include/qemu/rcu_queue.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/qemu/rcu_queue.h b/include/qemu/rcu_queue.h index 01be77407b..dd7b3be043 100644 --- a/include/qemu/rcu_queue.h +++ b/include/qemu/rcu_queue.h @@ -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. */ |