summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorlic121 <lic121@chinatelecom.cn>2022-03-01 13:26:23 +0000
committerAndrii Nakryiko <andrii@kernel.org>2022-03-07 21:56:54 -0800
commit9c6e6a80ee741adf6cb3cfd8eef7d1554f91fceb (patch)
treef3669be542de86e81f5b03d70dedac88c7ada345 /kernel/bpf
parentc344b9fc2108eeaa347c387219886cf87e520e93 (diff)
libbpf: Unmap rings when umem deleted
xsk_umem__create() does mmap for fill/comp rings, but xsk_umem__delete() doesn't do the unmap. This works fine for regular cases, because xsk_socket__delete() does unmap for the rings. But for the case that xsk_socket__create_shared() fails, umem rings are not unmapped. fill_save/comp_save are checked to determine if rings have already be unmapped by xsk. If fill_save and comp_save are NULL, it means that the rings have already been used by xsk. Then they are supposed to be unmapped by xsk_socket__delete(). Otherwise, xsk_umem__delete() does the unmap. Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices") Signed-off-by: Cheng Li <lic121@chinatelecom.cn> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220301132623.GA19995@vscode.7~
Diffstat (limited to 'kernel/bpf')
0 files changed, 0 insertions, 0 deletions