diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-08-26 21:12:11 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-13 16:47:34 +0200 |
commit | 9da33de62431c7839f98156720862262272a8380 (patch) | |
tree | 1a05e4bab566cf0aeba5890e536387c0859012ac /arch/um | |
parent | ac3d0da8f3290b3d394cdb7f50604424a7cd6092 (diff) | |
download | op-kernel-dev-9da33de62431c7839f98156720862262272a8380.zip op-kernel-dev-9da33de62431c7839f98156720862262272a8380.tar.gz |
task_work: task_work_add() should not succeed after exit_task_work()
ed3e694d "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 <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20120826191211.GA4228@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/um')
0 files changed, 0 insertions, 0 deletions