1
0
Fork 0

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>
5.9.x+fslc
Amol Grover 2020-02-21 20:45:38 +05:30 committed by David S. Miller
parent 27cf31dc20
commit 958a93c154
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}