]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: remove redundant req destruct in subflow_check_req()
authorJianguo Wu <wujianguo@chinatelecom.cn>
Sat, 10 Jul 2021 00:20:47 +0000 (17:20 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jul 2021 01:38:53 +0000 (18:38 -0700)
commit030d37bd1cd2443a1f21db47eb301899bfa45a2a
treecb98cd26b301fa768e7db75852af276457da4cca
parent0c71929b5893e410e0efbe1bbeca6f19a5f19956
mptcp: remove redundant req destruct in subflow_check_req()

In subflow_check_req(), if subflow sport is mismatch, will put msk,
destroy token, and destruct req, then return -EPERM, which can be
done by subflow_req_destructor() via:

  tcp_conn_request()
    |--__reqsk_free()
      |--subflow_req_destructor()

So we should remove these redundant code, otherwise will call
tcp_v4_reqsk_destructor() twice, and may double free
inet_rsk(req)->ireq_opt.

Fixes: 5bc56388c74f ("mptcp: add port number check for MP_JOIN")
Signed-off-by: Jianguo Wu <wujianguo@chinatelecom.cn>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/subflow.c