]> git.baikalelectronics.ru Git - kernel.git/commit
tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler()
authorEric Dumazet <edumazet@google.com>
Mon, 24 Jan 2022 20:24:53 +0000 (12:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jan 2022 11:25:21 +0000 (11:25 +0000)
commit27dd35e02235902933626469a1c9198612d72564
treeeb4ce5c37562915bc8032b5477fa1d52b38701ec
parentd507204d3c5cc57d9a8bdf0a477615bb59ea1611
tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler()

We will soon get rid of inet_twsk_purge().

This means that tw_timer_handler() might fire after
a netns has been dismantled/freed.

Instead of adding a function (and data structure) to find a netns
from tw->tw_net_cookie, just update the SNMP counters
a bit earlier, when the netns is known to be alive.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_timewait_sock.h
net/ipv4/inet_timewait_sock.c