Commit 65dd9cba authored by Tao Chen's avatar Tao Chen Committed by Greg Kroah-Hartman
Browse files

bpftool: Mount bpffs when pinmaps path not under the bpffs

[ Upstream commit da5f8fd1 ]

As Quentin said [0], BPF map pinning will fail if the pinmaps path is not
under the bpffs, like:

  libbpf: specified path /home/ubuntu/test/sock_ops_map is not on BPF FS
  Error: failed to pin all maps

  [0] https://github.com/libbpf/bpftool/issues/146



Fixes: 3767a94b ("bpftool: add pinmaps argument to the load/loadall")
Signed-off-by: default avatarTao Chen <chen.dylane@gmail.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Tested-by: default avatarQuentin Monnet <qmo@kernel.org>
Reviewed-by: default avatarQuentin Monnet <qmo@kernel.org>
Link: https://lore.kernel.org/bpf/20240702131150.15622-1-chen.dylane@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 91152073
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment