]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 29 Nov 2021 15:39:28 +0000 (10:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Dec 2021 08:04:46 +0000 (09:04 +0100)
commit80bf68ce3eb8697bfd62a8dfd08044e118d9dc72
tree49f04e8449e55690450e3cf5f15531b12a5b0a92
parent96169e451aa9a78899cbc5a32516d7e630a5bb0e
wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()

commit 5315c4d4b895324c37c70d635af871066c5ab901 upstream.

Use 2-factor argument form kvcalloc() instead of kvzalloc().

Link: https://github.com/KSPP/linux/issues/162
Fixes: 4dff5496e367 ("net: WireGuard secure network tunnel")
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
[Jason: Gustavo's link above is for KSPP, but this isn't actually a
 security fix, as table_size is bounded to 8192 anyway, and gcc realizes
 this, so the codegen comes out to be about the same.]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireguard/ratelimiter.c