Re: [PATCH net 2/2] wireguard: device: avoid circular netns references

2020-06-27 Thread Jason A. Donenfeld
Hi Dmitry, On Sat, Jun 27, 2020 at 2:59 AM Dmitry Vyukov wrote: > Hard to say. syzkaller frequently needs some time (days) to get > reasonable coverage of new code. > Is wg_netns_pre_exit executed synchronously in the context of a > syscall? If not, then it won't be shown as covered. If yes, then

Re: [PATCH net 2/2] wireguard: device: avoid circular netns references

2020-06-26 Thread Jason A. Donenfeld
Hey Dmitry, The below patch is now in net.git and in Linus' tree. It adds a network namespace deletion notifier, which does some things that impact the logic of the interface and involves a little bit of object lifetime management. You'll see at the very bottom I added a test case to rule out the

[PATCH net 2/2] wireguard: device: avoid circular netns references

2020-06-23 Thread Jason A. Donenfeld
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