]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/tty: Explicitly pass current to show_stack
authorMark Rutland <mark.rutland@arm.com>
Mon, 26 Sep 2016 15:16:18 +0000 (16:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 10:55:27 +0000 (12:55 +0200)
commitbb64105675c745066b9b60cda2708c85a18d5138
treea3823338b982f0b751795f64ef09fc71bb93659a
parent5fdb863f88981836f6b7032b9553880e1f2ac5d7
drivers/tty: Explicitly pass current to show_stack

As noted in commit:

  5b6a731592f7f3dc ("x86/dumpstack: Remove NULL task pointer convention")

... having a NULL task parameter imply current leads to subtle bugs in stack
walking code (so far seen on both 86 and arm64), makes callsites harder to
read, and is unnecessary as all callers have access to current.

As a step towards removing the problematic NULL-implies-current idiom entirely,
have the sysrq code explicitly pass current to show_stack.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/sysrq.c