On Fri, Feb 14, 2020 at 11:30 PM Eric Dumazet [off-list ref] wrote:
Also note that UDP sockets have SOCK_RCU_FREE flag set, so core
networking also respect one RCU grace period before freeing them.
if (use_call_rcu)
call_rcu(&sk->sk_rcu, __sk_destruct);
else
__sk_destruct(&sk->sk_rcu);
Ah, that's handy indeed.
It is possible that no extra synchronize_{net|rcu}() call is needed,
but this is left as an exercise for future kernels :)
Cool, yea, sounds like something I should play with for 5.7.
Sending v3 out in a few minutes.