kdb: Don't back trace on a cpu that didn't round up
commit4a53bde834af3c7f81a6f1022e9395330b594922
authorDouglas Anderson <dianders@chromium.org>
Wed, 5 Dec 2018 03:38:28 +0000 (4 19:38 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 19:02:30 +0000 (12 20:02 +0100)
tree91cab80d19ca2e244b66e04a99cac128b291487b
parentacd38b4d4eeab35c03e1aa0bf169ab3b8a7cad76
kdb: Don't back trace on a cpu that didn't round up

[ Upstream commit 162bc7f5afd75b72acbe3c5f3488ef7e64a3fe36 ]

If you have a CPU that fails to round up and then run 'btc' you'll end
up crashing in kdb becaue we dereferenced NULL.  Let's add a check.
It's wise to also set the task to NULL when leaving the debugger so
that if we fail to round up on a later entry into the debugger we
won't backtrace a stale task.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/debug/debug_core.c
kernel/debug/kdb/kdb_bt.c
kernel/debug/kdb/kdb_debugger.c