[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316642115-20029-13-git-send-email-jim.cromie@gmail.com>
Date: Wed, 21 Sep 2011 15:55:01 -0600
From: jim.cromie@...il.com
To: jbaron@...hat.com
Cc: joe@...ches.com, bart.vanassche@...il.com, greg@...ah.com,
linux-kernel@...r.kernel.org, Jim Cromie <jim.cromie@...il.com>
Subject: [PATCH 12/26] dynamic_debug: dont kill entire facility on error parsing ddebug_query
From: Jim Cromie <jim.cromie@...il.com>
Currently, a parsing error on ddebug_query results in effective loss
of the facility; all tables are removed, and the init-call returns error.
This is way too severe, especially when an innocent quoting error can
be the cause:
Kernel command line: ... ddebug_query='file char_dev.c +p'
yields:
ddebug_exec_queries: query 0: "'file"
query before parse <'file>
ddebug_exec_queries: processed 1 queries, with 1 errs
Invalid ddebug boot param 'file
Fix this by zeroing return-code for query parse errors before
returning from dynamic_debug_init().
Signed-off-by: Jim Cromie <jim.cromie@...il.com>
---
lib/dynamic_debug.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 0676de0..3f37b5e 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -922,12 +922,10 @@ static int __init dynamic_debug_init(void)
pr_info("ddebug initializing with string \"%s\"",
ddebug_setup_string);
ret = ddebug_exec_queries(ddebug_setup_string);
- if (ret)
- pr_warn("Invalid ddebug boot param %s",
- ddebug_setup_string);
- else
- pr_info("ddebug initialized with string %s",
- ddebug_setup_string);
+ if (ret) {
+ ret = 0; /* make this non-fatal */
+ pr_warn("invalid ddebug_query\n");
+ }
}
out_free:
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists