OSDN Git Service

freezer,umh: Fix call_usermode_helper_exec() vs SIGKILL
authorPeter Zijlstra <peterz@infradead.org>
Fri, 3 Feb 2023 14:31:11 +0000 (15:31 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 13 Feb 2023 15:36:14 +0000 (16:36 +0100)
commiteedeb787ebb53de5c5dcf7b7b39d01bf1b0f037d
tree62e298bf3aa2d36e0c7bab7d5d127b7ee6c5ab95
parentceaa837f96adb69c0df0397937cd74991d5d821a
freezer,umh: Fix call_usermode_helper_exec() vs SIGKILL

Tetsuo-San noted that commit f5d39b020809 ("freezer,sched: Rewrite
core freezer logic") broke call_usermodehelper_exec() for the KILLABLE
case.

Specifically it was missed that the second, unconditional,
wait_for_completion() was not optional and ensures the on-stack
completion is unused before going out-of-scope.

Fixes: f5d39b020809 ("freezer,sched: Rewrite core freezer logic")
Reported-by: syzbot+6cd18e123583550cf469@syzkaller.appspotmail.com
Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Debugged-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/Y90ar35uKQoUrLEK@hirez.programming.kicks-ass.net
kernel/umh.c