Skip to content
Permalink
Browse files
trace: param: fix tp_printk option related with tp_printk_stop_on_boot
Kernel param "tp_printk_stop_on_boot" starts with "tp_printk" which is
the exact as the other kernel param "tp_printk".
In compile & build process, It may not guaranteed that
"tp_printk_stop_on_boot" always checked before "tp_printk".
(By swapping its __setup() macro order, it may not work as expected.)
Some kernel params which starts with other kernel params consider this
problem. See commit 745a600 ("um: console: Ignore console= option")
or init/do_mounts.c:45 (setup function of "ro" kernel param)

Kernel param "tp_printk" can be handled with its value(0 or off) or
it can be handled without its value. (maybe it won't effect anything)
Fix setup function to ignore when the "tp_printk" becomes prefix of
other kernel param.

Signed-off-by: JaeSang Yoo <jsyoo5b@gmail.com>
  • Loading branch information
JSYoo5B authored and intel-lab-lkp committed Feb 8, 2022
1 parent 6b9b641 commit 2f6eb784171798586c7fde6d2f2e445ac5a344c3
Showing 1 changed file with 2 additions and 0 deletions.
@@ -252,6 +252,8 @@ __setup("trace_clock=", set_trace_boot_clock);

static int __init set_tracepoint_printk(char *str)
{
if (*str == '_')
return 0
if ((strcmp(str, "=0") != 0 && strcmp(str, "=off") != 0))
tracepoint_printk = 1;
return 1;

0 comments on commit 2f6eb78

Please sign in to comment.