diff options
author | Florian Westphal <fw@strlen.de> | 2020-04-02 14:44:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-02 16:59:21 +0300 |
commit | de06f57392b60e4d92135fbbedad4aea7d1107e2 (patch) | |
tree | 5da536aafa661bd143196ebeb6655afa0e9de9a5 /net/mptcp/token.c | |
parent | 59832e246515ab6a4f5aa878073e6f415aa35166 (diff) | |
download | linux-de06f57392b60e4d92135fbbedad4aea7d1107e2.tar.xz |
mptcp: re-check dsn before reading from subflow
mptcp_subflow_data_available() is commonly called via
ssk->sk_data_ready(), in this case the mptcp socket lock
cannot be acquired.
Therefore, while we can safely discard subflow data that
was already received up to msk->ack_seq, we cannot be sure
that 'subflow->data_avail' will still be valid at the time
userspace wants to read the data -- a previous read on a
different subflow might have carried this data already.
In that (unlikely) event, msk->ack_seq will have been updated
and will be ahead of the subflow dsn.
We can check for this condition and skip/resync to the expected
sequence number.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/token.c')
0 files changed, 0 insertions, 0 deletions