mptcp: fix 'Attempt to release TCP socket in state' warnings
authorFlorian Westphal <fw@strlen.de>
Fri, 17 Apr 2020 07:28:23 +0000 (09:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Apr 2020 22:43:20 +0000 (15:43 -0700)
commit9f5ca6a59816b406230adc440b6bb684fda90abe
tree40df7b66c503ce9569e475c97a602303a343f14e
parentdf1036da90108b1a9969721beab34f4c76228bcc
mptcp: fix 'Attempt to release TCP socket in state' warnings

We need to set sk_state to CLOSED, else we will get following:

IPv4: Attempt to release TCP socket in state 3 00000000b95f109e
IPv4: Attempt to release TCP socket in state 10 00000000b95f109e

First one is from inet_sock_destruct(), second one from
mptcp_sk_clone failure handling.  Setting sk_state to CLOSED isn't
enough, we also need to orphan sk so it has DEAD flag set.
Otherwise, a very similar warning is printed from inet_sock_destruct().

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c
net/mptcp/subflow.c