Searched hist:"99 d1055ce2469dca3dd14be0991ff8133e25e3d0" (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/net/mptcp/ |
H A D | subflow.c | diff 99d1055ce2469dca3dd14be0991ff8133e25e3d0 Thu Jun 10 17:59:41 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: wake-up readers only for in sequence data
Currently we rely on the subflow->data_avail field, which is subject to races:
ssk1 skb len = 500 DSS(seq=1, len=1000, off=0) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk2 skb len = 500 DSS(seq = 501, len=1000) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk1 skb len = 500 DSS(seq = 1, len=1000, off =500) # still data_avail == MPTCP_SUBFLOW_DATA_AVAIL, # as the skb is covered by a pre-existing map, # which was in-sequence at reception time.
Instead we can explicitly check if some has been received in-sequence, propagating the info from __mptcp_move_skbs_from_subflow().
Additionally add the 'ONCE' annotation to the 'data_avail' memory access, as msk will read it outside the subflow socket lock.
Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") 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 99d1055ce2469dca3dd14be0991ff8133e25e3d0 Thu Jun 10 17:59:41 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: wake-up readers only for in sequence data
Currently we rely on the subflow->data_avail field, which is subject to races:
ssk1 skb len = 500 DSS(seq=1, len=1000, off=0) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk2 skb len = 500 DSS(seq = 501, len=1000) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk1 skb len = 500 DSS(seq = 1, len=1000, off =500) # still data_avail == MPTCP_SUBFLOW_DATA_AVAIL, # as the skb is covered by a pre-existing map, # which was in-sequence at reception time.
Instead we can explicitly check if some has been received in-sequence, propagating the info from __mptcp_move_skbs_from_subflow().
Additionally add the 'ONCE' annotation to the 'data_avail' memory access, as msk will read it outside the subflow socket lock.
Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") 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 99d1055ce2469dca3dd14be0991ff8133e25e3d0 Thu Jun 10 17:59:41 CDT 2021 Paolo Abeni <pabeni@redhat.com> mptcp: wake-up readers only for in sequence data
Currently we rely on the subflow->data_avail field, which is subject to races:
ssk1 skb len = 500 DSS(seq=1, len=1000, off=0) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk2 skb len = 500 DSS(seq = 501, len=1000) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL
ssk1 skb len = 500 DSS(seq = 1, len=1000, off =500) # still data_avail == MPTCP_SUBFLOW_DATA_AVAIL, # as the skb is covered by a pre-existing map, # which was in-sequence at reception time.
Instead we can explicitly check if some has been received in-sequence, propagating the info from __mptcp_move_skbs_from_subflow().
Additionally add the 'ONCE' annotation to the 'data_avail' memory access, as msk will read it outside the subflow socket lock.
Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") 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>
|