]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
authorDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2020 23:20:48 +0000 (15:20 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2020 23:26:11 +0000 (15:26 -0800)
Daniel Borkmann says:

====================
pull-request: bpf 2020-12-28

The following pull-request contains BPF updates for your *net* tree.

There is a small merge conflict between bpf tree commit 6cce65791cb0
("bpf: Save correct stopping point in file seq iteration") and net tree
commit 0779e26a4c9b ("bpf/task_iter: In task_file_seq_get_next use
task_lookup_next_fd_rcu"). The get_files_struct() does not exist anymore
in net, so take the hunk in HEAD and add the `info->tid = curr_tid` to
the error path:

  [...]
                curr_task = task_seq_get_next(ns, &curr_tid, true);
                if (!curr_task) {
                        info->task = NULL;
                        info->tid = curr_tid;
                        return NULL;
                }

                /* set info->task and info->tid */
  [...]

We've added 10 non-merge commits during the last 9 day(s) which contain
a total of 11 files changed, 75 insertions(+), 20 deletions(-).

The main changes are:

1) Various AF_XDP fixes such as fill/completion ring leak on failed bind and
   fixing a race in skb mode's backpressure mechanism, from Magnus Karlsson.

2) Fix latency spikes on lockdep enabled kernels by adding a rescheduling
   point to BPF hashtab initialization, from Eric Dumazet.

3) Fix a splat in task iterator by saving the correct stopping point in the
   seq file iteration, from Jonathan Lemon.

4) Fix BPF maps selftest by adding retries in case hashtab returns EBUSY
   errors on update/deletes, from Andrii Nakryiko.

5) Fix BPF selftest error reporting to something more user friendly if the
   vmlinux BTF cannot be found, from Kamal Mostafa.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
kernel/bpf/syscall.c
kernel/bpf/task_iter.c

Simple merge
index e73c075930245938b7e6d3cbccbc4428928a7faf,dc4007f1843b2ee4bd6908c73211b20cb3b1418b..3efe38191d1cff886bb14abb92fd291eceb2f53e
@@@ -149,16 -151,27 +149,16 @@@ task_file_seq_get_next(struct bpf_iter_
  again:
        if (info->task) {
                curr_task = info->task;
 -              curr_files = info->files;
                curr_fd = info->fd;
        } else {
--              curr_task = task_seq_get_next(ns, &curr_tid, true);
--              if (!curr_task) {
--                      info->task = NULL;
 -                      info->files = NULL;
 -                      info->tid = curr_tid;
--                      return NULL;
--              }
--
-               /* set info->task and info->tid */
 -              curr_files = get_files_struct(curr_task);
 -              if (!curr_files) {
 -                      put_task_struct(curr_task);
 -                      curr_tid = curr_tid + 1;
 -                      info->fd = 0;
 -                      goto again;
 -              }
 -
 -              info->files = curr_files;
--              info->task = curr_task;
++                curr_task = task_seq_get_next(ns, &curr_tid, true);
++                if (!curr_task) {
++                        info->task = NULL;
++                        info->tid = curr_tid;
++                        return NULL;
++                }
++
++                /* set info->task and info->tid */
                if (curr_tid == info->tid) {
                        curr_fd = info->fd;
                } else {