]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: allowedips: initialize list head in selftest
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 4 Jun 2021 15:17:35 +0000 (17:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jun 2021 21:25:14 +0000 (14:25 -0700)
commitd17bd37751b5cabe9d07f5c48f330ccc47a86df1
tree92c5b1dd5a4a90ed7a6bd14e50d781513a28112e
parentdc2348b8c0ae652629ecb440f51f759942392838
wireguard: allowedips: initialize list head in selftest

The randomized trie tests weren't initializing the dummy peer list head,
resulting in a NULL pointer dereference when used. Fix this by
initializing it in the randomized trie test, just like we do for the
static unit test.

While we're at it, all of the other strings like this have the word
"self-test", so add it to the missing place here.

Fixes: 4dff5496e367 ("net: WireGuard secure network tunnel")
Cc: stable@vger.kernel.org
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wireguard/selftest/allowedips.c