diff options
author | Yonghong Song <yhs@fb.com> | 2020-12-30 21:24:18 -0800 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-01-03 01:41:32 +0100 |
commit | 04901aab40ea3779f6fc6383ef74d8e130e817bf (patch) | |
tree | 52ccd042d2780291a9414e905f3004bdf0eb7370 /kernel/kexec.c | |
parent | da4282c17d695b9311608aa63b3c633e649aadea (diff) |
bpf: Fix a task_iter bug caused by a merge conflict resolution
Latest bpf tree has a bug for bpf_iter selftest:
$ ./test_progs -n 4/25
test_bpf_sk_storage_get:PASS:bpf_iter_bpf_sk_storage_helpers__open_and_load 0 nsec
test_bpf_sk_storage_get:PASS:socket 0 nsec
...
do_dummy_read:PASS:read 0 nsec
test_bpf_sk_storage_get:FAIL:bpf_map_lookup_elem map value wasn't set correctly
(expected 1792, got -1, err=0)
#4/25 bpf_sk_storage_get:FAIL
#4 bpf_iter:FAIL
Summary: 0/0 PASSED, 0 SKIPPED, 2 FAILED
When doing merge conflict resolution, Commit 4bfc4714849d missed to
save curr_task to seq_file private data. The task pointer in seq_file
private data is passed to bpf program. This caused NULL-pointer task
passed to bpf program which will immediately return upon checking
whether task pointer is NULL.
This patch added back the assignment of curr_task to seq_file private
data and fixed the issue.
Fixes: 4bfc4714849d ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20201231052418.577024-1-yhs@fb.com
Diffstat (limited to 'kernel/kexec.c')
0 files changed, 0 insertions, 0 deletions