diff options
author | Matthieu Baerts (NGI0) <matttbe@kernel.org> | 2024-11-12 20:18:35 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-13 18:51:02 -0800 |
commit | db3eab8110bc0520416101b6a5b52f44a43fb4cf (patch) | |
tree | ff71f8ebde3253ff5e4ae2844a048998556fa906 /COPYING | |
parent | f642c5c4d528d11bd78b6c6f84f541cd3c0bea86 (diff) |
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: 86e39e04482b ("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>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions