/* kernel sockets do not by default acquire net ref, but TCP timer
* needs it.
* Update ns_tracker to current stack trace and refcounted tracker.
*/
__netns_tracker_free(net, &sf->sk->ns_tracker, false);
sf->sk->sk_net_refcnt = 1;
get_net_track(net, &sf->sk->ns_tracker, GFP_KERNEL);
sock_inuse_add(net, 1);
We should check if the bug fixed by the code is no longer reproducible without this code.
See Eric's commit: 151c9c724d05d5b0dd8acd3e11cb69ef1f2dbada https://lore.kernel.org/r/20240322135732.1535772-1-edumazet@google.com
We can then remove:
We should check if the bug fixed by the code is no longer reproducible without this code.