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]>
2 files changed