diff options
| author | Magnus Karlsson <[email protected]> | 2020-09-02 08:52:23 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-09-02 14:49:40 +0000 |
| commit | 53ea2076d851ee37e4f3954c5ae569439b138248 (patch) | |
| tree | 42d52f57c17258c1c57da9ff5ff8081c2975fb99 /tools/testing/selftests/bpf/prog_tests/global_data_init.c | |
| parent | selftests/bpf: Test task_file iterator without visiting pthreads (diff) | |
| download | kernel-53ea2076d851ee37e4f3954c5ae569439b138248.tar.gz kernel-53ea2076d851ee37e4f3954c5ae569439b138248.zip | |
xsk: Fix possible segfault in xsk umem diagnostics
Fix possible segfault in the xsk diagnostics code when dumping
information about the umem. This can happen when a umem has been
created, but the socket has not been bound yet. In this case, the xsk
buffer pool does not exist yet and we cannot dump the information
that was moved from the umem to the buffer pool. Fix this by testing
for the existence of the buffer pool and if not there, do not dump any
of that information.
Fixes: c2d3d6a47462 ("xsk: Move queue_id, dev and need_wakeup to buffer pool")
Fixes: 7361f9c3d719 ("xsk: Move fill and completion rings to buffer pool")
Reported-by: [email protected]
Signed-off-by: Magnus Karlsson <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/global_data_init.c')
0 files changed, 0 insertions, 0 deletions
