tmp_suning_uos_patched/tools/testing
Jason A. Donenfeld 900575aa33 wireguard: device: avoid circular netns references
Before, we took a reference to the creating netns if the new netns was
different. This caused issues with circular references, with two
wireguard interfaces swapping namespaces. The solution is to rather not
take any extra references at all, but instead simply invalidate the
creating netns pointer when that netns is deleted.

In order to prevent this from happening again, this commit improves the
rough object leak tracking by allowing it to account for created and
destroyed interfaces, aside from just peers and keys. That then makes it
possible to check for the object leak when having two interfaces take a
reference to each others' namespaces.

Fixes: e7096c131e ("net: WireGuard secure network tunnel")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-23 14:50:34 -07:00
..
fault-injection
ktest
kunit
nvdimm tools/testing/nvdimm: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
radix-tree
scatterlist
selftests wireguard: device: avoid circular netns references 2020-06-23 14:50:34 -07:00
vsock