This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mptcp: Avoid tcp_done and mptcp_sock_def_error_report warnings
It seems to be possible that we are in tcp_keepalive_timer with send_mp_fclose set to 1 and during that time a call to tcp_close ends up closing the subflow. Once we successfully manage to pass the bh_lock_sock() and sock_owned*() barrier in tcp_keepalive_timer we then may end up in the condition triggering the sending of a fast-close. But, the socket is now in TCP_CLOSE state, thus leading to an error in tcp_done if we end up calling tcp_write_err(). All timers handle this kind of a "race" by checking sk_state for TCP_CLOSE right after passing the bh_lock_sock() barrier. Even tcp_keepalive_timer makes sure that we won't do anything on a socket in TCP_CLOSE state. Thus, we need to check for sk_state before entering the send_mp_fclose condition. Fixes: a313bd7 ("mptcp: Correctly wait for RST when FASTCLOSE'ing") Signed-off-by: Christoph Paasch <cpaasch@apple.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit 80a651c) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit db07838) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> (cherry picked from commit ef76cf9) Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
- Loading branch information