linux/net/mptcp
Matthieu Baerts (NGI0) db3eab8110 mptcp: pm: use _rcu variant under rcu_read_lock
In mptcp_pm_create_subflow_or_signal_addr(), rcu_read_(un)lock() are
used as expected to iterate over the list of local addresses, but
list_for_each_entry() was used instead of list_for_each_entry_rcu() in
__lookup_addr(). It is important to use this variant which adds the
required READ_ONCE() (and diagnostic checks if enabled).

Because __lookup_addr() is also used in mptcp_pm_nl_set_flags() where it
is called under the pernet->lock and not rcu_read_lock(), an extra
condition is then passed to help the diagnostic checks making sure
either the associated spin lock or the RCU lock is held.

Fixes: 86e39e0448 ("mptcp: keep track of local endpoint still available for each msk")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20241112-net-mptcp-misc-6-12-pm-v1-3-b835580cefa8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-11-13 18:51:02 -08:00
..
bpf.c
crypto_test.c mptcp: fill in missing MODULE_DESCRIPTION() 2023-12-17 20:54:22 +00:00
crypto.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ctrl.c mptcp: disable active MPTCP in case of blackhole 2024-09-11 15:57:50 -07:00
diag.c mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size 2024-08-13 19:13:25 -07:00
fastopen.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
Kconfig
Makefile
mib.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
mib.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
mptcp_diag.c mptcp: drop duplicate header inclusions 2024-03-06 20:24:10 -08:00
mptcp_pm_gen.c mptcp: no admin perm to list endpoints 2024-11-05 17:51:08 -08:00
mptcp_pm_gen.h mptcp: add token for get-addr in yaml 2024-03-04 13:07:45 +00:00
options.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
pm_netlink.c mptcp: pm: use _rcu variant under rcu_read_lock 2024-11-13 18:51:02 -08:00
pm_userspace.c mptcp: hold pm lock when deleting entry 2024-11-13 18:51:02 -08:00
pm.c mptcp: pm: reduce entries iterations on connect 2024-09-03 15:25:42 -07:00
protocol.c mptcp: cope racing subflow creation in mptcp_rcv_space_adjust 2024-11-11 19:06:34 -08:00
protocol.h mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
sched.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
sockopt.c mptcp: pr_debug: add missing \n at the end 2024-08-27 14:45:16 -07:00
subflow.c mptcp: prevent MPC handshake on port-based signal endpoints 2024-10-15 10:57:02 -07:00
syncookies.c
token_test.c mptcp: token kunit: set protocol 2024-02-26 18:42:12 -08:00
token.c