mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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]>
This commit is contained in:
parent
be0e6f290f
commit
9a13049e83
2 changed files with 11 additions and 2 deletions
|
|
@ -132,8 +132,7 @@ static int jffs2_garbage_collect_thread(void *_c)
|
|||
case SIGSTOP:
|
||||
jffs2_dbg(1, "%s(): SIGSTOP received\n",
|
||||
__func__);
|
||||
set_current_state(TASK_STOPPED);
|
||||
schedule();
|
||||
kernel_signal_stop();
|
||||
break;
|
||||
|
||||
case SIGKILL:
|
||||
|
|
|
|||
Loading…
Reference in a new issue