mbox series

[bpf,v2,0/3] Don't reinit map value in prealloc_lru_pop

Message ID 20220809140615.21231-1-memxor@gmail.com (mailing list archive)
Headers show
Series Don't reinit map value in prealloc_lru_pop | expand

Message

Kumar Kartikeya Dwivedi Aug. 9, 2022, 2:06 p.m. UTC
Fix for a bug in prelloc_lru_pop spotted while reading the code, then a test +
example that checks whether it is fixed.

Changelog:
----------
v1 -> v2:
v1: https://lore.kernel.org/bpf/20220806014603.1771-1-memxor@gmail.com

 * Expand commit log to include summary of the discussion with Yonghong
 * Make lru_bug selftest serial to not mess up refcount for map_kptr test

Kumar Kartikeya Dwivedi (3):
  bpf: Allow calling bpf_prog_test kfuncs in tracing programs
  bpf: Don't reinit map value in prealloc_lru_pop
  selftests/bpf: Add test for prealloc_lru_pop bug

 kernel/bpf/hashtab.c                          |  6 +-
 net/bpf/test_run.c                            |  1 +
 .../selftests/bpf/prog_tests/lru_bug.c        | 19 ++++++
 tools/testing/selftests/bpf/progs/lru_bug.c   | 67 +++++++++++++++++++
 4 files changed, 88 insertions(+), 5 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/lru_bug.c
 create mode 100644 tools/testing/selftests/bpf/progs/lru_bug.c

Comments

Alexei Starovoitov Aug. 9, 2022, 6:49 p.m. UTC | #1
On Tue, Aug 9, 2022 at 7:06 AM Kumar Kartikeya Dwivedi <memxor@gmail.com> wrote:
>
> Fix for a bug in prelloc_lru_pop spotted while reading the code, then a test +
> example that checks whether it is fixed.
>
> Changelog:
> ----------
> v1 -> v2:
> v1: https://lore.kernel.org/bpf/20220806014603.1771-1-memxor@gmail.com
>
>  * Expand commit log to include summary of the discussion with Yonghong
>  * Make lru_bug selftest serial to not mess up refcount for map_kptr test

hmm. CI is still not happy.
Kumar Kartikeya Dwivedi Aug. 9, 2022, 8:04 p.m. UTC | #2
On Tue, 9 Aug 2022 at 20:49, Alexei Starovoitov
<alexei.starovoitov@gmail.com> wrote:
>
> On Tue, Aug 9, 2022 at 7:06 AM Kumar Kartikeya Dwivedi <memxor@gmail.com> wrote:
> >
> > Fix for a bug in prelloc_lru_pop spotted while reading the code, then a test +
> > example that checks whether it is fixed.
> >
> > Changelog:
> > ----------
> > v1 -> v2:
> > v1: https://lore.kernel.org/bpf/20220806014603.1771-1-memxor@gmail.com
> >
> >  * Expand commit log to include summary of the discussion with Yonghong
> >  * Make lru_bug selftest serial to not mess up refcount for map_kptr test
>
> hmm. CI is still not happy.

Yeah, I'll try to check for it differently.