From: "Toke Høiland-Jørgensen" <toke@redhat•com>
To: Andrea Claudi <aclaudi@redhat•com>, netdev@vger•kernel.org
Cc: stephen@networkplumber•org, dsahern@gmail•com
Subject: Re: [PATCH iproute2] lib: bpf_legacy: fix bpffs mount when /sys/fs/bpf exists
Date: Tue, 21 Sep 2021 12:04:12 +0200 [thread overview]
Message-ID: <87czp24543.fsf@toke.dk> (raw)
In-Reply-To: <617d61727a8c73fd28a1eb4136f8159f7f6779d9.1632216695.git.aclaudi@redhat.com>
Andrea Claudi <aclaudi@redhat•com> writes:
> bpf selftests using iproute2 fails with:
>
> $ ip link set dev veth0 xdp object ../bpf/xdp_dummy.o section xdp_dummy
> Continuing without mounted eBPF fs. Too old kernel?
> mkdir (null)/globals failed: No such file or directory
> Unable to load program
>
> This happens when the /sys/fs/bpf directory exists. In this case, mkdir
> in bpf_mnt_check_target() fails with errno == EEXIST, and the function
> returns -1. Thus bpf_get_work_dir() does not call bpf_mnt_fs() and the
> bpffs is not mounted.
>
> Fix this in bpf_mnt_check_target(), returning 0 when the mountpoint
> exists.
>
> Fixes: d4fcdbbec9df ("lib/bpf: Fix and simplify bpf_mnt_check_target()")
> Reported-by: Mingyu Shi <mshi@redhat•com>
> Reported-by: Jiri Benc <jbenc@redhat•com>
> Suggested-by: Jiri Benc <jbenc@redhat•com>
> Signed-off-by: Andrea Claudi <aclaudi@redhat•com>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat•com>
prev parent reply other threads:[~2021-09-21 10:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-21 9:33 [PATCH iproute2] lib: bpf_legacy: fix bpffs mount when /sys/fs/bpf exists Andrea Claudi
2021-09-21 10:04 ` Toke Høiland-Jørgensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czp24543.fsf@toke.dk \
--to=toke@redhat$(echo .)com \
--cc=aclaudi@redhat$(echo .)com \
--cc=dsahern@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox