diff options
| author | Ian Rogers <[email protected]> | 2022-09-01 20:26:45 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2022-09-02 13:57:18 +0000 |
| commit | af515a5587b8f45f19e11657746e0c89411b0380 (patch) | |
| tree | cbf2995ac174c0303f65551e312734c3cf1e1219 /drivers/usb/cdns3/cdns3-plat.c | |
| parent | selftests/bpf: Store BPF object files with .bpf.o extension (diff) | |
| download | kernel-af515a5587b8f45f19e11657746e0c89411b0380.tar.gz kernel-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 <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Magnus Karlsson <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-plat.c')
0 files changed, 0 insertions, 0 deletions
