Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: fix possible memory leak on syn_recv race
When subflow_syn_recv_sock() loses the inet hash insert race, the newly created children will be released by inet_csk_complete_hashdance(). In that scenario, without any further hint, the ulp release callback will keep the ulp context alive, expecting that the msk socket will later free it. Anyway the dying child is not linked to any msk socket, and the context will be leaked, as reported by Christoph. Address the issue explicitly releasing the context in the critical scenario. Fixes: cec37a6 ("mptcp: Handle MP_CAPABLE options for outgoing connections") Reported-by: Christoph Paasch <[email protected]> Closes: #356 Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Matthieu Baerts <[email protected]>
- Loading branch information