Skip to content
Commit 4ed468ed authored by Carlos López's avatar Carlos López Committed by Greg Kroah-Hartman
Browse files

tracing/probes: fix error check in parse_btf_field()

[ Upstream commit e569eb34 ]

btf_find_struct_member() might return NULL or an error via the
ERR_PTR() macro. However, its caller in parse_btf_field() only checks
for the NULL condition. Fix this by using IS_ERR() and returning the
error up the stack.

Link: https://lore.kernel.org/all/20240527094351.15687-1-clopez@suse.de/

Fixes: c440adfb

 ("tracing/probes: Support BTF based data structure field access")
Signed-off-by: default avatarCarlos López <clopez@suse.de>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c8f7c80b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment