linux/net/mptcp
Florian Westphal de06f57392 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>
2020-04-02 06:59:21 -07:00
..
crypto.c mptcp: Add ADD_ADDR handling 2020-03-29 22:14:48 -07:00
ctrl.c mptcp: new sysctl to control the activation per NS 2020-01-24 13:44:08 +01:00
diag.c mptcp: allow dumping subflow context to userspace 2020-03-29 22:14:48 -07:00
Kconfig mptcp: select CRYPTO 2020-02-16 19:37:16 -08:00
Makefile mptcp: add netlink-based PM 2020-03-29 22:14:49 -07:00
mib.c mptcp: add and use MIB counter infrastructure 2020-03-29 22:14:49 -07:00
mib.h mptcp: add and use MIB counter infrastructure 2020-03-29 22:14:49 -07:00
options.c mptcp: introduce MPTCP retransmission timer 2020-03-29 22:14:48 -07:00
pm_netlink.c mptcp: add netlink-based PM 2020-03-29 22:14:49 -07:00
pm.c mptcp: add netlink-based PM 2020-03-29 22:14:49 -07:00
protocol.c mptcp: re-check dsn before reading from subflow 2020-04-02 06:59:21 -07:00
protocol.h mptcp: subflow: check parent mptcp socket on subflow state change 2020-04-02 06:59:21 -07:00
subflow.c mptcp: subflow: check parent mptcp socket on subflow state change 2020-04-02 06:59:21 -07:00
token.c mptcp: Add handling of incoming MP_JOIN requests 2020-03-29 22:14:48 -07:00