netlabel_domainhash.c: Use built-in RCU list checking
Subsystems (4)
PATCH 1/1 netlabel_domainhash.c: Use built-in RCU list checking
From: Madhuparna Bhowmik <[email protected]>
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.
--- net/netlabel/netlabel_domainhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/netlabel/netlabel_domainhash.c +2 -1
@@ -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 )
Signature · 1 line
2.17.1
From: [email protected]
Date: Wed, 19 Feb 2020 00:11:32 +0530
Quoted 9 lines
From: Madhuparna Bhowmik <[email protected]>
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 whenCONFIG_PROVE_RCU_LISTis enabled by default.Signed-off-by Madhuparna Bhowmik <[email protected]>
Applied.
Quoted 5 lines · On Tue, Feb 18, 2020 at 1:42 PM <[email protected]> wrote:
From: Madhuparna Bhowmik <[email protected]>
list_for_each_entry_rcu()has built-in RCU and lock checking.
Quoted 8 lines
Pass cond argument to
list_for_each_entry_rcu()to silence false lockdep warning whenCONFIG_PROVE_RCU_LISTis enabled by default.Signed-off-by Madhuparna Bhowmik <[email protected]>--- net/netlabel/netlabel_domainhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Same as with the other patch.
Quoted 16 lines
net/netlabel/netlabel_domainhash.c +2
-2@@ -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 ) --2.17.1
Signature · 2 lines
paul moore www.paul-moore.com