]> git.karo-electronics.de Git - karo-tx-linux.git/commit
signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()
authorOleg Nesterov <oleg@redhat.com>
Wed, 21 Oct 2015 22:03:58 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:58 +0000 (09:03 +1100)
commit7080397e8eaad25e44281ab3d54b93d0eab5a675
tree2508ef7c3d229e0f71d6c5984fdefeb85c48fdea
parentffcb8dc55a9720c6eba617fddafb09ced24166f3
signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()

jffs2_garbage_collect_thread() can race with SIGCONT and sleep in
TASK_STOPPED state after it was already sent. Add the new helper,
kernel_signal_stop(), which does this correctly.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/jffs2/background.c
include/linux/sched.h