提交 9f12cea9 编写于 作者: M Mark Rutland 提交者: Greg Kroah-Hartman

drivers/tty: Explicitly pass current to show_stack

As noted in commit:

  81539169 ("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: NMark 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: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 4b75f800
...@@ -224,7 +224,7 @@ static void showacpu(void *dummy) ...@@ -224,7 +224,7 @@ static void showacpu(void *dummy)
spin_lock_irqsave(&show_lock, flags); spin_lock_irqsave(&show_lock, flags);
pr_info("CPU%d:\n", smp_processor_id()); pr_info("CPU%d:\n", smp_processor_id());
show_stack(NULL, NULL); show_stack(current, NULL);
spin_unlock_irqrestore(&show_lock, flags); spin_unlock_irqrestore(&show_lock, flags);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册