diff options
author | Jakub Sitnicki <jakub@cloudflare.com> | 2020-05-31 10:28:39 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-06-02 00:21:03 +0200 |
commit | 0c047ecbb7bab4c1d2136f5f04bb47a66a9a12b8 (patch) | |
tree | 0efdb4ab26c8013322151d42e1eaf31968ce0ed4 /tools/lib | |
parent | bpf: Add link-based BPF program attachment to network namespace (diff) | |
download | linux-0c047ecbb7bab4c1d2136f5f04bb47a66a9a12b8.tar.xz linux-0c047ecbb7bab4c1d2136f5f04bb47a66a9a12b8.zip |
bpf, cgroup: Return ENOLINK for auto-detached links on update
Failure to update a bpf_link because it has been auto-detached by a dying
cgroup currently results in EINVAL error, even though the arguments passed
to bpf() syscall are not wrong.
bpf_links attaching to netns in this case will return ENOLINK, which
carries the message that the link is no longer attached to anything.
Change cgroup bpf_links to do the same to keep the uAPI errors consistent.
Fixes: 0c991ebc8c69 ("bpf: Implement bpf_prog replacement for an active bpf_cgroup_link")
Suggested-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200531082846.2117903-6-jakub@cloudflare.com
Diffstat (limited to 'tools/lib')
0 files changed, 0 insertions, 0 deletions