signal: introduce kernel_signal_stop() to fix jffs2_garbage_collect_thread()
authorOleg Nesterov <[email protected]>
Sat, 7 Nov 2015 00:32:25 +0000 (16:32 -0800)
committerLinus Torvalds <[email protected]>
Sat, 7 Nov 2015 01:50:42 +0000 (17:50 -0800)
commit9a13049e83f346cb1cbd60c64e520a73c396af16
tree11a2ac2ac28dbfa477d5b4f1e14a2173b4867a8f
parentbe0e6f290f78b84a3b21b8c8c46819c4514fe632
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 <[email protected]>
Reviewed-by: Tejun Heo <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Markus Pargmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/jffs2/background.c
include/linux/sched.h