Searched hist:"490274 b47468793e3e157c2df6b2da0e646cc4a9" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/net/mptcp/ |
H A D | subflow.c | diff 490274b47468793e3e157c2df6b2da0e646cc4a9 Mon Jun 21 19:33:08 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: avoid race on msk state changes
The msk socket state is currently updated in a few spots without owning the msk socket lock itself.
Some of such operations are safe, as they happens before exposing the msk socket to user-space and can't race with other changes.
A couple of them, at connect time, can actually race with close() or shutdown(), leaving breaking the socket state machine.
This change addresses the issue moving such update under the msk socket lock with the usual:
<acquire spinlock> <check sk lock onwers> <ev defer to release_cb>
scheme.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/56 Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect") Fixes: c3c123d16c0e ("net: mptcp: don't hang in mptcp_sendmsg() after TCP fallback") Signed-off-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>
|
H A D | protocol.h | diff 490274b47468793e3e157c2df6b2da0e646cc4a9 Mon Jun 21 19:33:08 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: avoid race on msk state changes
The msk socket state is currently updated in a few spots without owning the msk socket lock itself.
Some of such operations are safe, as they happens before exposing the msk socket to user-space and can't race with other changes.
A couple of them, at connect time, can actually race with close() or shutdown(), leaving breaking the socket state machine.
This change addresses the issue moving such update under the msk socket lock with the usual:
<acquire spinlock> <check sk lock onwers> <ev defer to release_cb>
scheme.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/56 Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect") Fixes: c3c123d16c0e ("net: mptcp: don't hang in mptcp_sendmsg() after TCP fallback") Signed-off-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>
|
H A D | protocol.c | diff 490274b47468793e3e157c2df6b2da0e646cc4a9 Mon Jun 21 19:33:08 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: avoid race on msk state changes
The msk socket state is currently updated in a few spots without owning the msk socket lock itself.
Some of such operations are safe, as they happens before exposing the msk socket to user-space and can't race with other changes.
A couple of them, at connect time, can actually race with close() or shutdown(), leaving breaking the socket state machine.
This change addresses the issue moving such update under the msk socket lock with the usual:
<acquire spinlock> <check sk lock onwers> <ev defer to release_cb>
scheme.
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/56 Fixes: 8fd738049ac3 ("mptcp: fallback in case of simultaneous connect") Fixes: c3c123d16c0e ("net: mptcp: don't hang in mptcp_sendmsg() after TCP fallback") Signed-off-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>
|