summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ulp.c
diff options
context:
space:
mode:
authorAmol Grover <frextrite@gmail.com>2020-02-21 16:15:38 +0100
committerDavid S. Miller <davem@davemloft.net>2020-02-24 22:01:54 +0100
commit958a93c15466c69e2ec531332e67011f549943bd (patch)
tree76ac4e6dfd5994ff4ff1a90459ba36fdfdac4695 /net/ipv4/tcp_ulp.c
parentMerge branch 'mlxsw-Introduce-ACL-traps' (diff)
downloadlinux-958a93c15466c69e2ec531332e67011f549943bd.tar.xz
linux-958a93c15466c69e2ec531332e67011f549943bd.zip
tcp, ulp: Pass lockdep expression to RCU lists
tcp_ulp_list is traversed using list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of tcp_ulp_list_lock. Hence, add corresponding lockdep expression to silence false-positive warnings, and harden RCU lists.t Signed-off-by: Amol Grover <frextrite@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ulp.c')
-rw-r--r--net/ipv4/tcp_ulp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c
index 6c43fa189195..2703f24c5d1a 100644
--- a/net/ipv4/tcp_ulp.c
+++ b/net/ipv4/tcp_ulp.c
@@ -22,7 +22,8 @@ static struct tcp_ulp_ops *tcp_ulp_find(const char *name)
{
struct tcp_ulp_ops *e;
- list_for_each_entry_rcu(e, &tcp_ulp_list, list) {
+ list_for_each_entry_rcu(e, &tcp_ulp_list, list,
+ lockdep_is_held(&tcp_ulp_list_lock)) {
if (strcmp(e->name, name) == 0)
return e;
}