]> git.baikalelectronics.ru Git - kernel.git/commit
task_work: Simplify the usage in ptrace_notify() and get_signal_to_deliver()
authorOleg Nesterov <oleg@redhat.com>
Sun, 26 Aug 2012 19:12:17 +0000 (21:12 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 13 Sep 2012 14:47:37 +0000 (16:47 +0200)
commitfa72af7be340f59df8502992ef4d9bdc4716d9f2
tree40ec8dac81ab8bd5f23b1c440c30737d7acad6c9
parent10adbbef11cf97ec2f57fe3d1d0200684f77519d
task_work: Simplify the usage in ptrace_notify() and get_signal_to_deliver()

ptrace_notify() and get_signal_to_deliver() do unnecessary things
before task_work_run():

1. smp_mb__after_clear_bit() is not needed, test_and_clear_bit()
   implies mb().

2. And we do not need the barrier at all, in this case we only
   care about the "synchronous" works added by the task itself.

3. No need to clear TIF_NOTIFY_RESUME, and we should not assume
   task_works is the only user of this flag.

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/20120826191217.GA4238@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/signal.c