aboutsummaryrefslogtreecommitdiff
path: root/kernel/debug/kdb/kdb_bt.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <[email protected]>2020-09-07 13:32:06 -0700
committerDaniel Thompson <[email protected]>2020-09-08 14:36:46 +0100
commitece4ceaf2eba1c0da9d6b62bc59a43be6b456548 (patch)
tree57d08d26bb6fabef10f64c2119d4dccb5e69d25f /kernel/debug/kdb/kdb_bt.c
parentb18b099e04f450cdc77bec72acefcde7042bd1f3 (diff)
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 <[email protected]> Signed-off-by: Davidlohr Bueso <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Thompson <[email protected]>
Diffstat (limited to 'kernel/debug/kdb/kdb_bt.c')
-rw-r--r--kernel/debug/kdb/kdb_bt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/debug/kdb/kdb_bt.c b/kernel/debug/kdb/kdb_bt.c
index 18e03aba2cfc..1f9f0e47aeda 100644
--- a/kernel/debug/kdb/kdb_bt.c
+++ b/kernel/debug/kdb/kdb_bt.c
@@ -149,14 +149,14 @@ kdb_bt(int argc, const char **argv)
return 0;
}
/* Now the inactive tasks */
- kdb_do_each_thread(g, p) {
+ for_each_process_thread(g, p) {
if (KDB_FLAG(CMD_INTERRUPT))
return 0;
if (task_curr(p))
continue;
if (kdb_bt1(p, mask, btaprompt))
return 0;
- } kdb_while_each_thread(g, p);
+ }
} else if (strcmp(argv[0], "btp") == 0) {
struct task_struct *p;
unsigned long pid;