diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-04-01 23:45:44 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-04-01 23:45:52 +0200 |
commit | 6dcc4e38386950abf9060784631622dfc4df9577 (patch) | |
tree | 818d93eb379796febf71ff998a0c7edd0490e4f0 /include | |
parent | bpf: program: Refuse non-O_RDWR flags in BPF_OBJ_GET (diff) | |
parent | libbpf: Only create rx and tx XDP rings when necessary (diff) | |
download | linux-6dcc4e38386950abf9060784631622dfc4df9577.tar.xz linux-6dcc4e38386950abf9060784631622dfc4df9577.zip |
Merge branch 'AF_XDP Socket Creation Fixes'
Ciara Loftus says:
====================
This series fixes some issues around socket creation for AF_XDP.
Patch 1 fixes a potential NULL pointer dereference in
xsk_socket__create_shared.
Patch 2 ensures that the umem passed to xsk_socket__create(_shared)
remains unchanged in event of failure.
Patch 3 makes it possible for xsk_socket__create(_shared) to
succeed even if the rx and tx XDP rings have already been set up by
introducing a new fields to struct xsk_umem which represent the ring
setup status for the xsk which shares the fd with the umem.
v3->v4:
* Reduced nesting in xsk_put_ctx as suggested by Alexei.
* Use bools instead of a u8 and flags to represent the
ring setup status as suggested by Björn.
v2->v3:
* Instead of ignoring the return values of the setsockopt calls, introduce
a new flag to determine whether or not to call them based on the ring
setup status as suggested by Alexei.
v1->v2:
* Simplified restoring the _save pointers as suggested by Magnus.
* Fixed the condition which determines whether to unmap umem rings
when socket create fails.
====================
Acked-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions