summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/rhashtable.h3
-rw-r--r--lib/rhashtable.c4
-rw-r--r--net/netfilter/nft_hash.c2
-rw-r--r--net/netlink/af_netlink.c2
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 {
bool (*shrink_decision)(const struct rhashtable *ht,
size_t new_size);
#ifdef CONFIG_PROVE_LOCKING
- int (*mutex_is_held)(void);
+ int (*mutex_is_held)(void *parent);
+ void *parent;
#endif
};
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 @@
#ifdef CONFIG_PROVE_LOCKING
int lockdep_rht_mutex_is_held(const struct rhashtable *ht)
{
- return ht->p.mutex_is_held();
+ return ht->p.mutex_is_held(ht->p.parent);
}
EXPORT_SYMBOL_GPL(lockdep_rht_mutex_is_held);
#endif
@@ -618,7 +618,7 @@ EXPORT_SYMBOL_GPL(rhashtable_destroy);
#define TEST_NEXPANDS 4
#ifdef CONFIG_PROVE_LOCKING
-static int test_mutex_is_held(void)
+static int test_mutex_is_held(void *parent)
{
return 1;
}
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[])
}
#ifdef CONFIG_PROVE_LOCKING
-static int lockdep_nfnl_lock_is_held(void)
+static int lockdep_nfnl_lock_is_held(void *parent)
{
return lockdep_nfnl_is_held(NFNL_SUBSYS_NFTABLES);
}
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);
EXPORT_SYMBOL_GPL(nl_sk_hash_lock);
#ifdef CONFIG_PROVE_LOCKING
-static int lockdep_nl_sk_hash_is_held(void)
+static int lockdep_nl_sk_hash_is_held(void *parent)
{
if (debug_locks)
return lockdep_is_held(&nl_sk_hash_lock) || lockdep_is_held(&nl_table_lock);