From: Amol Grover Date: Fri, 21 Feb 2020 15:15:38 +0000 (+0530) Subject: tcp, ulp: Pass lockdep expression to RCU lists X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=958a93c15466c69e2ec531332e67011f549943bd;p=linux.git 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 Signed-off-by: David S. Miller --- diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c index 6c43fa189195d..2703f24c5d1a8 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; }