]> 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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 Nov 2021 03:50:50 +0000 (19:50 -0800)
commit8958301be0b9cd33a13dc7ad918f71f17bb984b3
treef4ae66308d001ab0f2a8f31dd563d2c33e0428a6
parentce1c32774fdd2a9c40d1183cae4963bfb77c5289
wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()

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

Link: https://github.com/KSPP/linux/issues/162
Fixes: 0c73bbc77a76 ("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>
drivers/net/wireguard/ratelimiter.c