History

netfilter: ipset: Pass lockdep expression to RCU lists

ip_set_type_list is traversed using list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of ip_set_type_mutex. Hence, add corresponding lockdep expression to silence false-positive warnings, and harden RCU lists.

Amol Grover committed 6 years ago

Commit b135fc01 parent 7fb6f781 file · +2 −1Browse files

Unified · Split

net/netfilter/ipset/ip_set_core.c+2−1
@@ -86,7 +86,8 @@ find_set_type(const char *name, u8 family, u8 revision) · 85 unmodified lines
86{86{
87 struct ip_set_type *type;87 struct ip_set_type *type;
88 88
89 list_for_each_entry_rcu(type, &ip_set_type_list, list)89 list_for_each_entry_rcu(type, &ip_set_type_list, list,
90 lockdep_is_held(&ip_set_type_mutex))
90 if (STRNCMP(type->name, name) &&91 if (STRNCMP(type->name, name) &&
91 (type->family == family ||92 (type->family == family ||
92 type->family == NFPROTO_UNSPEC) &&93 type->family == NFPROTO_UNSPEC) &&

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t