mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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:
parent
c32ab1c195
commit
e77e5481d5
3 changed files with 21 additions and 8 deletions
|
|
@ -1085,13 +1085,8 @@ static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync,
|
|||
* since after list_del_init(&wait->entry) the wait entry
|
||||
* might be de-allocated and the process might even have
|
||||
* exited.
|
||||
*
|
||||
* We _really_ should have a "list_del_init_careful()" to
|
||||
* properly pair with the unlocked "list_empty_careful()"
|
||||
* in finish_wait().
|
||||
*/
|
||||
smp_mb();
|
||||
list_del_init(&wait->entry);
|
||||
list_del_init_careful(&wait->entry);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue