Commit c177e0bf authored by Emilio G. Cota's avatar Emilio G. Cota Committed by Paolo Bonzini
Browse files

rcu_queue: use atomic_set in QLIST_REMOVE_RCU



To avoid undefined behaviour.

Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
Message-Id: <20180819091335.22863-2-cota@braap.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent db7196db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.  */