summaryrefslogtreecommitdiffstats
path: root/kernel/debug/gdbstub.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2020-09-07 22:32:06 +0200
committerDaniel Thompson <daniel.thompson@linaro.org>2020-09-08 15:36:46 +0200
commitece4ceaf2eba1c0da9d6b62bc59a43be6b456548 (patch)
tree57d08d26bb6fabef10f64c2119d4dccb5e69d25f /kernel/debug/gdbstub.c
parentkgdb: Make "kgdbcon" work properly with "kgdb_earlycon" (diff)
downloadlinux-ece4ceaf2eba1c0da9d6b62bc59a43be6b456548.tar.xz
linux-ece4ceaf2eba1c0da9d6b62bc59a43be6b456548.zip
kdb: Use newer api for tasklist scanning
This kills using the do_each_thread/while_each_thread combo to iterate all threads and uses for_each_process_thread() instead, maintaining semantics. while_each_thread() is ultimately racy and deprecated; although in this particular case there is no concurrency so it doesn't matter. Still lets trivially get rid of two more users. Acked-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Link: https://lore.kernel.org/r/20200907203206.21293-1-dave@stgolabs.net Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Diffstat (limited to 'kernel/debug/gdbstub.c')
-rw-r--r--kernel/debug/gdbstub.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/debug/gdbstub.c b/kernel/debug/gdbstub.c
index cc3c43dfec44..b52ebff09ac8 100644
--- a/kernel/debug/gdbstub.c
+++ b/kernel/debug/gdbstub.c
@@ -725,7 +725,7 @@ static void gdb_cmd_query(struct kgdb_state *ks)
}
}
- do_each_thread(g, p) {
+ for_each_process_thread(g, p) {
if (i >= ks->thr_query && !finished) {
int_to_threadref(thref, p->pid);
ptr = pack_threadid(ptr, thref);
@@ -735,7 +735,7 @@ static void gdb_cmd_query(struct kgdb_state *ks)
finished = 1;
}
i++;
- } while_each_thread(g, p);
+ }
*(--ptr) = '\0';
break;