diff options
| -rw-r--r-- | include/linux/rhashtable.h | 3 | ||||
| -rw-r--r-- | lib/rhashtable.c | 4 | ||||
| -rw-r--r-- | net/netfilter/nft_hash.c | 2 | ||||
| -rw-r--r-- | net/netlink/af_netlink.c | 2 |
4 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index 96ce8ceff554..473e26bdb91d 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -66,7 +66,8 @@ struct rhashtable_params { | |||
| 66 | bool (*shrink_decision)(const struct rhashtable *ht, | 66 | bool (*shrink_decision)(const struct rhashtable *ht, |
| 67 | size_t new_size); | 67 | size_t new_size); |
| 68 | #ifdef CONFIG_PROVE_LOCKING | 68 | #ifdef CONFIG_PROVE_LOCKING |
| 69 | int (*mutex_is_held)(void); | 69 | int (*mutex_is_held)(void *parent); |
| 70 | void *parent; | ||
| 70 | #endif | 71 | #endif |
| 71 | }; | 72 | }; |
| 72 | 73 | ||
diff --git a/lib/rhashtable.c b/lib/rhashtable.c index c7654b6f5f64..4b4b53bfa08b 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #ifdef CONFIG_PROVE_LOCKING | 32 | #ifdef CONFIG_PROVE_LOCKING |
| 33 | int lockdep_rht_mutex_is_held(const struct rhashtable *ht) | 33 | int lockdep_rht_mutex_is_held(const struct rhashtable *ht) |
| 34 | { | 34 | { |
| 35 | return ht->p.mutex_is_held(); | 35 | return ht->p.mutex_is_held(ht->p.parent); |
| 36 | } | 36 | } |
| 37 | EXPORT_SYMBOL_GPL(lockdep_rht_mutex_is_held); | 37 | EXPORT_SYMBOL_GPL(lockdep_rht_mutex_is_held); |
| 38 | #endif | 38 | #endif |
| @@ -618,7 +618,7 @@ EXPORT_SYMBOL_GPL(rhashtable_destroy); | |||
| 618 | #define TEST_NEXPANDS 4 | 618 | #define TEST_NEXPANDS 4 |
| 619 | 619 | ||
| 620 | #ifdef CONFIG_PROVE_LOCKING | 620 | #ifdef CONFIG_PROVE_LOCKING |
| 621 | static int test_mutex_is_held(void) | 621 | static int test_mutex_is_held(void *parent) |
| 622 | { | 622 | { |
| 623 | return 1; | 623 | return 1; |
| 624 | } | 624 | } |
diff --git a/net/netfilter/nft_hash.c b/net/netfilter/nft_hash.c index b86305c86048..3f75aaaf9d06 100644 --- a/net/netfilter/nft_hash.c +++ b/net/netfilter/nft_hash.c | |||
| @@ -154,7 +154,7 @@ static unsigned int nft_hash_privsize(const struct nlattr * const nla[]) | |||
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | #ifdef CONFIG_PROVE_LOCKING | 156 | #ifdef CONFIG_PROVE_LOCKING |
| 157 | static int lockdep_nfnl_lock_is_held(void) | 157 | static int lockdep_nfnl_lock_is_held(void *parent) |
| 158 | { | 158 | { |
| 159 | return lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES); | 159 | return lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES); |
| 160 | } | 160 | } |
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 53b8ea793191..9e0628cfdf67 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
| @@ -115,7 +115,7 @@ DEFINE_MUTEX(nl_sk_hash_lock); | |||
| 115 | EXPORT_SYMBOL_GPL(nl_sk_hash_lock); | 115 | EXPORT_SYMBOL_GPL(nl_sk_hash_lock); |
| 116 | 116 | ||
| 117 | #ifdef CONFIG_PROVE_LOCKING | 117 | #ifdef CONFIG_PROVE_LOCKING |
| 118 | static int lockdep_nl_sk_hash_is_held(void) | 118 | static int lockdep_nl_sk_hash_is_held(void *parent) |
| 119 | { | 119 | { |
| 120 | if (debug_locks) | 120 | if (debug_locks) |
| 121 | return lockdep_is_held(&nl_sk_hash_lock) || lockdep_is_held(&nl_table_lock); | 121 | return lockdep_is_held(&nl_sk_hash_lock) || lockdep_is_held(&nl_table_lock); |
