kernel/params: fix a pr_debug(" %p ") in parse_one()
PATCH 1/1 kernel/params: fix a pr_debug(" %p ") in parse_one()
Inside parse_one(), the core parameter-parsing engine prints the address of the parameter-set callback function using %p:pr_debug("handling %s with %p\n", param, params[i].ops->set);
Since the string value of the parameter being parsed (val) is already available, print the parameter name and its value instead, and avoid tainting the kernel by exposing a kernel-ptr.
Signed-off-by Jim Cromie <[email protected]>
--- kernel/params.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/params.c +2 -2
@@ -136,8 +136,8 @@ static int parse_one(char *param,if (!val && !(params[i].ops->flags &KERNEL_PARAM_OPS_FL_NOARG ))return -EINVAL ; -pr_debug ("handling %s with %p\n" , param, - params[i].ops->set); +pr_debug ("handling %s with value '%s'\n" , param, + val ? val :"no-arg" );kernel_param_lock (params[i].mod);if (param_check_unsafe (¶ms[i])) err = params[i].ops->set (val, ¶ms[i]);
Signature · 1 line
2.54.0