diff options
author | Magnus Karlsson <magnus.karlsson@intel.com> | 2020-09-02 11:52:23 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-09-02 17:49:40 +0300 |
commit | 53ea2076d851ee37e4f3954c5ae569439b138248 (patch) | |
tree | 42d52f57c17258c1c57da9ff5ff8081c2975fb99 /tools | |
parent | 858e8b2eb4dd6fe6c4640463ad2f2ed3b8249ad4 (diff) | |
download | linux-53ea2076d851ee37e4f3954c5ae569439b138248.tar.xz |
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: syzbot+3f04d36b7336f7868066@syzkaller.appspotmail.com
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/1599036743-26454-1-git-send-email-magnus.karlsson@intel.com
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions