]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tracing/probes: Fix to set arg size and fmt after setting type from BTF
authorMasami Hiramatsu (Google) <mhiramat@kernel.org>
Tue, 23 Jan 2024 15:03:02 +0000 (00:03 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:25:05 +0000 (09:25 +0100)
commitebc1972c2c89daa8c8292c7477e38cbf9c27278e
tree2e73ac7aec305d7f359162cd499f015a7bc44c84
parentd5889a68522c2d2da6ee75e75aa36e2997b6d4dd
tracing/probes: Fix to set arg size and fmt after setting type from BTF

commit 9a571c1e275cedacd48c66a6bddd0c23f1dffdbf upstream.

Since the BTF type setting updates probe_arg::type, the type size
calculation and setting print-fmt should be done after that.
Without this fix, the argument size and print-fmt can be wrong.

Link: https://lore.kernel.org/all/170602218196.215583.6417859469540955777.stgit@devnote2/
Fixes: b576e09701c7 ("tracing/probes: Support function parameters if BTF is available")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_probe.c