Skip to content
Commit eb29429d authored by Daniel Borkmann's avatar Daniel Borkmann
Browse files

bpf, sockmap: fix sock hash count in alloc_sock_hash_elem



When we try to allocate a new sock hash entry and the allocation
fails, then sock hash map fails to reduce the map element counter,
meaning we keep accounting this element although it was never used.
Fix it by dropping the element counter on error.

Fixes: 81110384 ("bpf: sockmap, add hash map support")
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Acked-by: default avatarJohn Fastabend <john.fastabend@gmail.com>
parent b845c898
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment