projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: timer: Fix leak in events via snd_timer_user_tinterrupt
[firefly-linux-kernel-4.4.55.git]
/
lib
/
llist.c
diff --git
a/lib/llist.c
b/lib/llist.c
index 0b0e9779d6753b1a3982551afdbb685e0b6a209e..ae5872b1df0c669fc8365ce1754d2a128651a890 100644
(file)
--- 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;
{
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;
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;
entry = cmpxchg(&head->first, old_entry, next);
if (entry == old_entry)
break;