multipath-tcp / mptcp_net-next

Development version of the Upstream MultiPath TCP Linux kernel 🐧
https://mptcp.dev
Other
290 stars 41 forks source link

remove refcount on TCP sockets for the timers #481

Open matttbe opened 8 months ago

matttbe commented 8 months ago

See Eric's commit: 151c9c724d05d5b0dd8acd3e11cb69ef1f2dbada https://lore.kernel.org/r/20240322135732.1535772-1-edumazet@google.com

We can then remove:

/* 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.