aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug/kdb/kdb_debugger.c
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2018-12-04 19:38:28 -0800
committerDaniel Thompson <daniel.thompson@linaro.org>2018-12-30 08:31:23 +0000
commit162bc7f5afd75b72acbe3c5f3488ef7e64a3fe36 (patch)
tree28a6c66c667177ad20271d85d332f0e3831b955f /kernel/debug/kdb/kdb_debugger.c
parentkgdb: Don't round up a CPU that failed rounding up before (diff)
downloadlinux-dev-162bc7f5afd75b72acbe3c5f3488ef7e64a3fe36.tar.xz
linux-dev-162bc7f5afd75b72acbe3c5f3488ef7e64a3fe36.zip
kdb: Don't back trace on a cpu that didn't round up
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>
Diffstat (limited to '')
-rw-r--r--kernel/debug/kdb/kdb_debugger.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/kernel/debug/kdb/kdb_debugger.c b/kernel/debug/kdb/kdb_debugger.c
index 15e1a7af5dd0..53a0df6e4d92 100644
--- a/kernel/debug/kdb/kdb_debugger.c
+++ b/kernel/debug/kdb/kdb_debugger.c
@@ -118,13 +118,6 @@ int kdb_stub(struct kgdb_state *ks)
kdb_bp_remove();
KDB_STATE_CLEAR(DOING_SS);
KDB_STATE_SET(PAGER);
- /* zero out any offline cpu data */
- for_each_present_cpu(i) {
- if (!cpu_online(i)) {
- kgdb_info[i].debuggerinfo = NULL;
- kgdb_info[i].task = NULL;
- }
- }
if (ks->err_code == DIE_OOPS || reason == KDB_REASON_OOPS) {
ks->pass_exception = 1;
KDB_FLAG_SET(CATASTROPHIC);