list: add "list_del_init_careful()" to go with "list_empty_careful()"

[ Upstream commit c6fe44d96fc1536af5b11cd859686453d1b7bfd1 ]

That gives us ordering guarantees around the pair.

Signed-off-by: Linus Torvalds <[email protected]>
Stable-dep-of: 2192bba03d80 ("epoll: ep_autoremove_wake_function should use list_del_init_careful")
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
Linus Torvalds 2020-07-23 12:33:41 -07:00 • committed by Greg Kroah-Hartman
commit e77e5481d5
3 changed files with 21 additions and 8 deletions

View file

@ -384,7 +384,7 @@ int autoremove_wake_function(struct wait_queue_entry *wq_entry, unsigned mode, i
int ret = default_wake_function(wq_entry, mode, sync, key);
if (ret)
list_del_init(&wq_entry->entry);
list_del_init_careful(&wq_entry->entry);
return ret;
}