lkml.org 
[lkml]   [2016]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/7] ipc/sem.c: Remove smp_rmb() from complexmode_enter()
Date
complexmode_enter() contains an smp_rmb() after spin_unlock_wait().
This was done to allow safe backporting.

Commit 2c6100227116 ("locking/qspinlock: Fix spin_unlock_wait() some more")
(and the commits for the other archs) ensure that spin_unlock_wait()
is an ACQUIRE.
Therefore the smp_rmb() after spin_unlock_wait() can be removed.

Not for stable!

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
---
ipc/sem.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 5e318c5..6586e0a 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -290,14 +290,6 @@ static void complexmode_enter(struct sem_array *sma)
sem = sma->sem_base + i;
spin_unlock_wait(&sem->lock);
}
- /*
- * spin_unlock_wait() is not a memory barriers, it is only a
- * control barrier. The code must pair with spin_unlock(&sem->lock),
- * thus just the control barrier is insufficient.
- *
- * smp_rmb() is sufficient, as writes cannot pass the control barrier.
- */
- smp_rmb();
}

/*
--
2.7.4
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.137 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site