summaryrefslogtreecommitdiff
path: root/net/mptcp/token.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-04-02 14:44:53 +0300
committerDavid S. Miller <davem@davemloft.net>2020-04-02 16:59:21 +0300
commitde06f57392b60e4d92135fbbedad4aea7d1107e2 (patch)
tree5da536aafa661bd143196ebeb6655afa0e9de9a5 /net/mptcp/token.c
parent59832e246515ab6a4f5aa878073e6f415aa35166 (diff)
downloadlinux-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