]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Error out when binary_path is NULL for uprobe and USDT
authorHengqi Chen <hengqi.chen@gmail.com>
Tue, 12 Jul 2022 02:57:45 +0000 (10:57 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 13 Jul 2022 19:02:59 +0000 (12:02 -0700)
commitd35c303d3b67b1c0941e947683ca3d7834c1ef9f
tree6eac39532f5954222bd4d75efe8ead2d6cc77026
parent9138da8474d751b2bed23f9cd88340a19e92877c
libbpf: Error out when binary_path is NULL for uprobe and USDT

binary_path is a required non-null parameter for bpf_program__attach_usdt
and bpf_program__attach_uprobe_opts. Check it against NULL to prevent
coredump on strchr.

Signed-off-by: Hengqi Chen <hengqi.chen@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220712025745.2703995-1-hengqi.chen@gmail.com
tools/lib/bpf/libbpf.c