summaryrefslogtreecommitdiffstats
path: root/kernel/lib/llist.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lib/llist.c')
-rw-r--r--kernel/lib/llist.c4
1 files changed, 2 insertions, 2 deletions
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;