X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=kernel%2Flib%2Fllist.c;h=ae5872b1df0c669fc8365ce1754d2a128651a890;hb=ff067418f34c3670cbab67587d8ab0dc0c8f1acc;hp=0b0e9779d6753b1a3982551afdbb685e0b6a209e;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/kernel/lib/llist.c b/kernel/lib/llist.c index 0b0e9779d..ae5872b1d 100644 --- a/kernel/lib/llist.c +++ b/kernel/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;