This is a note to let you know that I've just added the patch titled tools/bpftool: Fix attaching flow dissector to the 5.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tools-bpftool-fix-attaching-flow-dissector.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 210f4b06fc395585334ad35396cf24dad96ac2fc Author: Lorenz Bauer <lmb@xxxxxxxxxxxxxx> Date: Thu Nov 5 11:52:30 2020 +0000 tools/bpftool: Fix attaching flow dissector [ Upstream commit f9b7ff0d7f7a466a920424246e7ddc2b84c87e52 ] My earlier patch to reject non-zero arguments to flow dissector attach broke attaching via bpftool. Instead of 0 it uses -1 for target_fd. Fix this by passing a zero argument when attaching the flow dissector. Fixes: 1b514239e859 ("bpf: flow_dissector: Check value of unused flags to BPF_PROG_ATTACH") Reported-by: Jiri Benc <jbenc@xxxxxxxxxx> Signed-off-by: Lorenz Bauer <lmb@xxxxxxxxxxxxxx> Signed-off-by: Alexei Starovoitov <ast@xxxxxxxxxx> Acked-by: Song Liu <songliubraving@xxxxxx> Link: https://lore.kernel.org/bpf/20201105115230.296657-1-lmb@xxxxxxxxxxxxxx Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index d393eb8263a60..994506540e564 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -741,7 +741,7 @@ static int parse_attach_detach_args(int argc, char **argv, int *progfd, } if (*attach_type == BPF_FLOW_DISSECTOR) { - *mapfd = -1; + *mapfd = 0; return 0; }