]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Tue, 5 Jul 2022 21:32:13 +0000 (14:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2022 11:50:26 +0000 (12:50 +0100)
commitda129caee582b334de49ab9105cc7c5dca5b0499
tree4fe7f7f89d45858bfad5f4de76d823dc526125bd
parent286cc7a9446ddf45a8ed660cdeb2e20217a47f8b
mptcp: Acquire the subflow socket lock before modifying MP_PRIO flags

When setting up a subflow's flags for sending MP_PRIO MPTCP options, the
subflow socket lock was not held while reading and modifying several
struct members that are also read and modified in mptcp_write_options().

Acquire the subflow socket lock earlier and send the MP_PRIO ACK with
that lock already acquired. Add a new variant of the
mptcp_subflow_send_ack() helper to use with the subflow lock held.

Fixes: 641df33b6ffc ("mptcp: add the outgoing MP_PRIO support")
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c
net/mptcp/protocol.c
net/mptcp/protocol.h