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
8686 {
8787 struct ip_set_type *type;
8888
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))
9091 if (STRNCMP(type->name, name) &&
9192 (type->family == family ||
9293 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