diff options
| author | Jim Cromie <jim.cromie@gmail.com> | 2026-06-18 13:07:15 -0600 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-08-03 21:10:06 -0700 |
| commit | b4e28b4db72c8005baf4bacfeb8fcf686b13154e (patch) | |
| tree | e0dc52a78f743ee4cf050177dcafdfe9fae115f9 /kernel | |
| parent | c04cffb8c51618538f0c05c478a931eb6e1a806b (diff) | |
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.
Link: https://lore.kernel.org/20260618190715.3563047-1-jim.cromie@gmail.com
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/params.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/params.c b/kernel/params.c index a668863a4bb6..5c8a05921e28 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -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]); |
