Please sign in to comment.
task_work: task_work_add() should not succeed after exit_task_work()
ed3e694 "move exit_task_work() past exit_files() et.al" destroyed the add/exit synchronization we had, the caller itself should ensure task_work_add() can't race with the exiting task. However, this is not convenient/simple, and the only user which tries to do this is buggy (see the next patch). Unless the task is current, there is simply no way to do this in general. Change exit_task_work()->task_work_run() to use the dummy "work_exited" entry to let task_work_add() know it should fail. Signed-off-by: Oleg Nesterov <email@example.com> Signed-off-by: Peter Zijlstra <firstname.lastname@example.org> Cc: Al Viro <email@example.com> Cc: Linus Torvalds <firstname.lastname@example.org> Cc: Andrew Morton <email@example.com> Cc: Thomas Gleixner <firstname.lastname@example.org> Link: http://lkml.kernel.org/r/20120826191211.GA4228@redhat.com Signed-off-by: Ingo Molnar <email@example.com>
- Loading branch information...
Showing with 17 additions and 8 deletions.