diff options
author | Pengcheng Yang <yangpc@wangsu.com> | 2023-05-06 06:07:19 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-05-17 16:58:18 +0300 |
commit | 2a36c26fe3b8e2cf39e15e80ba1abc889a75da4f (patch) | |
tree | 7c8409b8e57913dfb54ddb0dcb252973e16f6a4d /tools/bpf/bpftool/struct_ops.c | |
parent | f04a32b2c5b539e3c097cb5c7c1df12a8f4a0cf0 (diff) | |
download | linux-2a36c26fe3b8e2cf39e15e80ba1abc889a75da4f.tar.xz |
bpftool: Support bpffs mountpoint as pin path for prog loadall
Currently, when using prog loadall and the pin path is a bpffs mountpoint,
bpffs will be repeatedly mounted to the parent directory of the bpffs
mountpoint path. For example, a `bpftool prog loadall test.o /sys/fs/bpf`
will trigger this.
Signed-off-by: Pengcheng Yang <yangpc@wangsu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/1683342439-3677-1-git-send-email-yangpc@wangsu.com
Diffstat (limited to 'tools/bpf/bpftool/struct_ops.c')
-rw-r--r-- | tools/bpf/bpftool/struct_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/struct_ops.c b/tools/bpf/bpftool/struct_ops.c index 57c3da70aa31..3ebc9fe91e0e 100644 --- a/tools/bpf/bpftool/struct_ops.c +++ b/tools/bpf/bpftool/struct_ops.c @@ -509,7 +509,7 @@ static int do_register(int argc, char **argv) if (argc == 1) linkdir = GET_ARG(); - if (linkdir && mount_bpffs_for_pin(linkdir)) { + if (linkdir && mount_bpffs_for_pin(linkdir, true)) { p_err("can't mount bpffs for pinning"); return -1; } |