mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pidfd: Add warning if exit_state is 0 during notification
Previously a condition got missed where the pidfd waiters are awakened before the exit_state gets set. This can result in a missed notification [1] and the polling thread waiting forever. It is fixed now, however it would be nice to avoid this kind of issue going unnoticed in the future. So just add a warning to catch it in the future. /* References */ [1]: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Joel Fernandes (Google) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
This commit is contained in:
parent
3884ae44f4
commit
1caf7d50f4
1 changed files with 1 additions and 0 deletions
|
|
@ -1885,6 +1885,7 @@ static void do_notify_pidfd(struct task_struct *task)
|
|||
{
|
||||
struct pid *pid;
|
||||
|
||||
WARN_ON(task->exit_state == 0);
|
||||
pid = task_pid(task);
|
||||
wake_up_all(&pid->wait_pidfd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue