tcp, ulp: Pass lockdep expression to RCU lists
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- net/ipv4/tcp_ulp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/ipv4/tcp_ulp.c +2 -1
@@ -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; }
Signature · 1 line
2.24.1
From: Amol Grover <[email protected]>
Date: Fri, 21 Feb 2020 20:45:38 +0530
Quoted 8 lines
tcp_ulp_listis traversed usinglist_for_each_entry_rcuoutside an RCU read-side critical section but under the protection oftcp_ulp_list_lock.Hence, add corresponding lockdep expression to silence false-positive warnings, and harden RCU lists.t
Signed-off-by Amol Grover <[email protected]>
Applied.