diff options
author | Daniel Borkmann <[email protected]> | 2018-08-22 18:09:17 +0200 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2018-08-22 20:35:18 +0200 |
commit | eb29429d81e31b191f3b2bd19cf820279cec6463 (patch) | |
tree | 8226d9ef2befb79ae7f8857ba6b8e2d1504f6cdf /net/lapb/lapb_subr.c | |
parent | b845c898b2f1ea458d5453f0fa1da6e2dfce3bb4 (diff) |
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: 81110384441a ("bpf: sockmap, add hash map support")
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: John Fastabend <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions