summaryrefslogtreecommitdiff
path: root/tools/bpf
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2022-09-01 13:26:45 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2022-09-02 15:57:18 +0200
commitaf515a5587b8f45f19e11657746e0c89411b0380 (patch)
treecbf2995ac174c0303f65551e312734c3cf1e1219 /tools/bpf
parentafef88e65554c3e8691513b8350d6445e292560e (diff)
downloadlinux-rpi-af515a5587b8f45f19e11657746e0c89411b0380.tar.gz
linux-rpi-af515a5587b8f45f19e11657746e0c89411b0380.tar.bz2
linux-rpi-af515a5587b8f45f19e11657746e0c89411b0380.zip
selftests/xsk: Avoid use-after-free on ctx
The put lowers the reference count to 0 and frees ctx, reading it afterwards is invalid. Move the put after the uses and determine the last use by the reference count being 1. Fixes: 39e940d4abfa ("selftests/xsk: Destroy BPF resources only when ctx refcount drops to 0") Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Magnus Karlsson <magnus.karlsson@intel.com> Link: https://lore.kernel.org/bpf/20220901202645.1463552-1-irogers@google.com
Diffstat (limited to 'tools/bpf')
0 files changed, 0 insertions, 0 deletions