aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/debug
diff options
context:
space:
mode:
authorJason Wessel <jason.wessel@windriver.com>2013-02-04 11:35:33 -0500
committerJason Wessel <jason.wessel@windriver.com>2013-03-02 09:52:19 -0500
commit1b2caa2dcb8f18d2be9c5c3c992cb6da03f1a70a (patch)
treebb1d38bf2d0c5e0cd40366fd221fe0db647e9e4b /kernel/debug
parent074604af21c971cf2fcfaa0f6012b4b0c9ca891a (diff)
kdb: Remove the ll command
Recently some code inspection was done after fixing a problem with kmalloc used while in the kernel debugger context (which is not legal), and it turned up the fact that kdb ll command will oops the kernel. Given that there have been zero bug reports on the command combined with the fact it will oops the kernel it is clearly not being used. Instead of fixing it, it will be removed. Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'kernel/debug')
-rw-r--r--kernel/debug/kdb/kdb_main.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 25908cf2f5d7..cdfc0a7e583e 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -2362,69 +2362,6 @@ static int kdb_pid(int argc, const char **argv)
2362 return 0; 2362 return 0;
2363} 2363}
2364 2364
2365/*
2366 * kdb_ll - This function implements the 'll' command which follows a
2367 * linked list and executes an arbitrary command for each
2368 * element.
2369 */
2370static int kdb_ll(int argc, const char **argv)
2371{
2372 int diag = 0;
2373 unsigned long addr;
2374 long offset = 0;
2375 unsigned long va;
2376 unsigned long linkoffset;
2377 int nextarg;
2378 const char *command;
2379
2380 if (argc != 3)
2381 return KDB_ARGCOUNT;
2382
2383 nextarg = 1;
2384 diag = kdbgetaddrarg(argc, argv, &nextarg, &addr, &offset, NULL);
2385 if (diag)
2386 return diag;
2387
2388 diag = kdbgetularg(argv[2], &linkoffset);
2389 if (diag)
2390 return diag;
2391
2392 /*
2393 * Using the starting address as
2394 * the first element in the list, and assuming that
2395 * the list ends with a null pointer.
2396 */
2397
2398 va = addr;
2399 command = kdb_strdup(argv[3], GFP_KDB);
2400 if (!command) {
2401 kdb_printf("%s: cannot duplicate command\n", __func__);
2402 return 0;
2403 }
2404 /* Recursive use of kdb_parse, do not use argv after this point */
2405 argv = NULL;
2406
2407 while (va) {
2408 char buf[80];
2409
2410 if (KDB_FLAG(CMD_INTERRUPT))
2411 goto out;
2412
2413 sprintf(buf, "%s " kdb_machreg_fmt "\n", command, va);
2414 diag = kdb_parse(buf);
2415 if (diag)
2416 goto out;
2417
2418 addr = va + linkoffset;
2419 if (kdb_getword(&va, addr, sizeof(va)))
2420 goto out;
2421 }
2422
2423out:
2424 kfree(command);
2425 return diag;
2426}
2427
2428static int kdb_kgdb(int argc, const char **argv) 2365static int kdb_kgdb(int argc, const char **argv)
2429{ 2366{
2430 return KDB_CMD_KGDB; 2367 return KDB_CMD_KGDB;
@@ -2866,8 +2803,6 @@ static void __init kdb_inittab(void)
2866 kdb_register_repeat("btt", kdb_bt, "<vaddr>", 2803 kdb_register_repeat("btt", kdb_bt, "<vaddr>",
2867 "Backtrace process given its struct task address", 0, 2804 "Backtrace process given its struct task address", 0,
2868 KDB_REPEAT_NONE); 2805 KDB_REPEAT_NONE);
2869 kdb_register_repeat("ll", kdb_ll, "<first-element> <linkoffset> <cmd>",
2870 "Execute cmd for each element in linked list", 0, KDB_REPEAT_NONE);
2871 kdb_register_repeat("env", kdb_env, "", 2806 kdb_register_repeat("env", kdb_env, "",
2872 "Show environment variables", 0, KDB_REPEAT_NONE); 2807 "Show environment variables", 0, KDB_REPEAT_NONE);
2873 kdb_register_repeat("set", kdb_set, "", 2808 kdb_register_repeat("set", kdb_set, "",