Yonghong Song 04901aab40 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
2021-01-03 01:41:32 +01:00
..
2020-12-09 17:47:36 -08:00
2020-11-24 16:47:49 +01:00
2020-12-16 16:38:41 -08:00
2020-12-15 22:46:18 -08:00
2020-12-16 10:45:11 -08:00
2020-12-14 18:29:11 -08:00
2020-12-17 13:22:17 -08:00
2020-12-02 22:52:16 -05:00
2020-12-16 10:54:03 -08:00
2020-12-14 18:29:11 -08:00
2020-12-09 17:08:45 +01:00
2020-12-15 22:46:19 -08:00
2020-12-17 13:01:31 -08:00
2020-12-14 16:40:27 -08:00
2020-11-14 11:26:04 -08:00
2020-12-17 13:01:31 -08:00
2020-12-14 16:40:27 -08:00
2020-07-27 14:31:12 -04:00
2020-12-01 10:30:28 +00:00
2020-12-16 11:30:10 -08:00
2020-12-16 12:33:35 -08:00
2019-12-18 18:07:31 +01:00
2020-12-14 16:40:27 -08:00
2020-08-19 14:14:12 +02:00
2020-07-07 11:58:59 -05:00
2020-08-19 14:13:20 +02:00