From: Lance Roy <ldr709@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>,
Lance Roy <ldr709@gmail.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
Florian Westphal <fw@strlen.de>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org
Subject: [PATCH 14/16] netfilter: Replace spin_is_locked() with lockdep
Date: Tue, 2 Oct 2018 22:39:00 -0700 [thread overview]
Message-ID: <20181003053902.6910-15-ldr709@gmail.com> (raw)
In-Reply-To: <20181003053902.6910-1-ldr709@gmail.com>
lockdep_assert_held() is better suited to checking locking requirements,
since it won't get confused when someone else holds the lock. This is
also a step towards possibly removing spin_is_locked().
Signed-off-by: Lance Roy <ldr709@gmail.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Cc: Florian Westphal <fw@strlen.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <netfilter-devel@vger.kernel.org>
Cc: <coreteam@netfilter.org>
Cc: <netdev@vger.kernel.org>
---
net/netfilter/ipset/ip_set_hash_gen.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 8a33dac4e805..e287da68d5fa 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -15,7 +15,7 @@
#define __ipset_dereference_protected(p, c) rcu_dereference_protected(p, c)
#define ipset_dereference_protected(p, set) \
- __ipset_dereference_protected(p, spin_is_locked(&(set)->lock))
+ __ipset_dereference_protected(p, lockdep_is_held(&(set)->lock))
#define rcu_dereference_bh_nfnl(p) rcu_dereference_bh_check(p, 1)
--
2.19.0
next prev parent reply other threads:[~2018-10-03 5:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181003053902.6910-1-ldr709@gmail.com>
2018-10-03 5:38 ` [PATCH 04/16] i40e: Replace spin_is_locked() with lockdep Lance Roy
2018-10-04 18:56 ` [Intel-wired-lan] " Bowers, AndrewX
2018-10-03 5:38 ` [PATCH 05/16] igbvf: " Lance Roy
2018-10-13 0:11 ` Brown, Aaron F
2018-10-03 5:38 ` [PATCH 06/16] sfc: " Lance Roy
2018-10-03 5:38 ` [PATCH 07/16] smsc: " Lance Roy
2018-10-03 5:38 ` [PATCH 08/16] wireless: " Lance Roy
2018-10-03 9:06 ` Kalle Valo
2018-10-04 6:57 ` Lance Roy
2018-10-04 10:05 ` Kalle Valo
2018-10-05 8:35 ` [PATCH 08/16] zd1211rw: " Kalle Valo
2018-10-03 5:39 ` Lance Roy [this message]
2018-10-03 8:29 ` [PATCH 14/16] netfilter: " Jozsef Kadlecsik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181003053902.6910-15-ldr709@gmail.com \
--to=ldr709@gmail.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=paulmck@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).