netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier
@ 2016-09-01 15:27 Manfred Spraul
  2016-09-01 15:30 ` Will Deacon
  0 siblings, 1 reply; 9+ messages in thread
From: Manfred Spraul @ 2016-09-01 15:27 UTC (permalink / raw)
  To: benh, paulmck, Ingo Molnar, Boqun Feng, Peter Zijlstra,
	Andrew Morton
  Cc: LKML, will.deacon, 1vier1, Davidlohr Bueso, Manfred Spraul,
	Pablo Neira Ayuso, netfilter-devel

Since spin_unlock_wait() is defined as equivalent to spin_lock();
spin_unlock(), the memory barrier before spin_unlock_wait() is
also not required.

Not for stable!

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
---
 net/netfilter/nf_conntrack_core.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 7a3b5e6..0591a25 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -139,13 +139,7 @@ static void nf_conntrack_all_lock(void)
 
 	spin_lock(&nf_conntrack_locks_all_lock);
 
-	/*
-	 * Order the store of 'nf_conntrack_locks_all' against
-	 * the spin_unlock_wait() loads below, such that if
-	 * nf_conntrack_lock() observes 'nf_conntrack_locks_all'
-	 * we must observe nf_conntrack_locks[] held:
-	 */
-	smp_store_mb(nf_conntrack_locks_all, true);
+	nf_conntrack_locks_all = true;
 
 	for (i = 0; i < CONNTRACK_LOCKS; i++) {
 		spin_unlock_wait(&nf_conntrack_locks[i]);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-06 17:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01 15:27 [PATCH 8/7] net/netfilter/nf_conntrack_core: Remove another memory barrier Manfred Spraul
2016-09-01 15:30 ` Will Deacon
2016-09-01 16:41   ` Peter Zijlstra
2016-09-02  6:17     ` Boqun Feng
2016-09-02  6:35     ` Manfred Spraul
2016-09-02 19:22       ` Peter Zijlstra
2016-09-03  5:33         ` Manfred Spraul
2016-09-05 18:57         ` Manfred Spraul
2016-09-06 17:56           ` Will Deacon

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).