diff options
Diffstat (limited to 'lib/llist.c')
| -rw-r--r-- | lib/llist.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
| 66 | { | 66 | { |
| 67 | struct llist_node *entry, *old_entry, *next; | 67 | struct llist_node *entry, *old_entry, *next; |
| 68 | 68 | ||
| 69 | entry = head->first; | 69 | entry = smp_load_acquire(&head->first); |
| 70 | for (;;) { | 70 | for (;;) { |
| 71 | if (entry == NULL) | 71 | if (entry == NULL) |
| 72 | return NULL; | 72 | return NULL; |
| 73 | old_entry = entry; | 73 | old_entry = entry; |
| 74 | next = entry->next; | 74 | next = READ_ONCE(entry->next); |
| 75 | entry = cmpxchg(&head->first, old_entry, next); | 75 | entry = cmpxchg(&head->first, old_entry, next); |
| 76 | if (entry == old_entry) | 76 | if (entry == old_entry) |
| 77 | break; | 77 | break; |
