X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=lib%2Fllist.c;h=ae5872b1df0c669fc8365ce1754d2a128651a890;hb=7cf19af4debc804e408b059d58df7c9c226ca6fb;hp=0b0e9779d6753b1a3982551afdbb685e0b6a209e;hpb=e1b63dec2ddba654c7ca75996284e453f32d1af7;p=cascardo%2Flinux.git diff --git a/lib/llist.c b/lib/llist.c index 0b0e9779d675..ae5872b1df0c 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -66,12 +66,12 @@ struct llist_node *llist_del_first(struct llist_head *head) { struct llist_node *entry, *old_entry, *next; - entry = head->first; + entry = smp_load_acquire(&head->first); for (;;) { if (entry == NULL) return NULL; old_entry = entry; - next = entry->next; + next = READ_ONCE(entry->next); entry = cmpxchg(&head->first, old_entry, next); if (entry == old_entry) break;