]> git.baikalelectronics.ru Git - kernel.git/commit
uml: Don't consult current to find the proc_mnt in mconsole_proc
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 27 Jun 2018 19:39:54 +0000 (14:39 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 28 Feb 2020 17:34:47 +0000 (11:34 -0600)
commit4ceafc2f096aca3cc932d875430a39f979fc19a9
tree4200342998a3e6f2052c6b67c6921ba8348c4f00
parentbcfc0fea3f36addc807fd07d5ff1a5fde5a60309
uml: Don't consult current to find the proc_mnt in mconsole_proc

Inspection of the control flow reveals that mconsole_proc is either
called from mconsole_stop called from mc_work_proc or from
mc_work_proc directly.  The function mc_work_proc is dispatched to a
kernel thread with schedule_work.

All of the threads that run dispatched by schedule_work are in the
init pid namespace.

So make the code clearer and by using init_pid_ns instead of
task_active_pid_ns(current).

Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/um/drivers/mconsole_kern.c