]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: hash map: decrement counter on error
authorMauricio Vasquez B <mauricio.vasquez@polito.it>
Fri, 29 Jun 2018 12:48:20 +0000 (14:48 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 3 Jul 2018 21:26:28 +0000 (23:26 +0200)
commit32aaf48f82b9165f86d998024b3216c12082a4bd
tree4a208a727bd13dee13aad3b7202b259a6ed4aa5d
parentd951a9970d08206dd7fd4b81efe9fbbcf3b6f91c
bpf: hash map: decrement counter on error

Decrement the number of elements in the map in case the allocation
of a new node fails.

Fixes: ad97dd3b1903 ("bpf: pre-allocate hash map elements")
Signed-off-by: Mauricio Vasquez B <mauricio.vasquez@polito.it>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/hashtab.c