]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:06:58 +0000 (13:06 +0200)
commitba80c24ebc85ced0d9efe83b73651558f67bce56
treef15546eadff224a8cbf453ce18ec1720380f1ccc
parent4e956777f974ae60b6c9d588b813205a3c154da9
bpf: hash map: decrement counter on error

[ Upstream commit ed2b82c03dc187018307c7c6bf9299705f3db383 ]

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

Fixes: 6c9059817432 ("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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/bpf/hashtab.c