diff options
author | Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com> | 2020-02-19 00:11:32 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-18 12:44:23 -0800 |
commit | 9facfdb5467382a21fc0bd4211ced26c06f28832 (patch) | |
tree | f8215ce7b8f2ac7f34189989deab631751067c3c /net | |
parent | 8c70c3d72833a08214ff8c8df1f7d9778509888d (diff) | |
download | linux-9facfdb5467382a21fc0bd4211ced26c06f28832.tar.gz linux-9facfdb5467382a21fc0bd4211ced26c06f28832.tar.bz2 linux-9facfdb5467382a21fc0bd4211ced26c06f28832.zip |
netlabel_domainhash.c: Use built-in RCU list checking
list_for_each_entry_rcu() has built-in RCU and lock checking.
Pass cond argument to list_for_each_entry_rcu() to silence
false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled
by default.
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netlabel/netlabel_domainhash.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index f5d34da0646e..a1f2320ecc16 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c @@ -143,7 +143,8 @@ static struct netlbl_dom_map *netlbl_domhsh_search(const char *domain, if (domain != NULL) { bkt = netlbl_domhsh_hash(domain); bkt_list = &netlbl_domhsh_rcu_deref(netlbl_domhsh)->tbl[bkt]; - list_for_each_entry_rcu(iter, bkt_list, list) + list_for_each_entry_rcu(iter, bkt_list, list, + lockdep_is_held(&netlbl_domhsh_lock)) if (iter->valid && netlbl_family_match(iter->family, family) && strcmp(iter->domain, domain) == 0) |