]> git.itanic.dy.fi Git - linux-stable/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:03:23 +0000 (09:03 +0100)
commit1c75779dd90c727d1a7fdb65a330e1f5dd05dbbb
tree9433db0558f7a64c5aba3571c52ae0e594f35125
parentcb2d7c1992cb7019499831abf0f32759905bc248
wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()

commit 4e3fd721710553832460c179c2ee5ce67ef7f1e0 upstream.

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

Link: https://github.com/KSPP/linux/issues/162
Fixes: e7096c131e51 ("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