On Friday 19 July 2013 16:58:09 Waiman Long wrote:
>
> I supposed that only the gcc compiler can be used to build Linux kernel
> as the kernel source uses a lot of features specific to gcc.
Look at http://llvm.linuxfoundation.org - they're using clang with more and
more success.
--
JS
--
To
On Fri, Jul 19, 2013 at 03:08:36PM -0400, Waiman Long wrote:
> On 07/19/2013 02:31 PM, Peter Zijlstra wrote:
> >mutex_can_spin_on_owner() is broken in that it would allow the compiler
> >to load lock->owner twice, seeing a pointer first time and a MULL
> >pointer the second time.
> >
> >Signed-off-
On 07/19/2013 03:41 PM, Thomas Gleixner wrote:
On Fri, 19 Jul 2013, Waiman Long wrote:
On 07/19/2013 02:31 PM, Peter Zijlstra wrote:
rcu_read_lock();
- if (lock->owner)
- retval = lock->owner->on_cpu;
+ owner = ACCESS_ONCE(lock->owner);
+ if (owner)
+
On Fri, Jul 19, 2013 at 12:41 PM, Thomas Gleixner wrote:
>
> That's true for your particular compiler, but it's not guaranteed at
> all. So it matters even when your compiler generates the same
> code. Others might not. There is a world outside of x8664.
Well, in this case, I think we can pretty
On Fri, 19 Jul 2013, Waiman Long wrote:
> On 07/19/2013 02:31 PM, Peter Zijlstra wrote:
> > rcu_read_lock();
> > - if (lock->owner)
> > - retval = lock->owner->on_cpu;
> > + owner = ACCESS_ONCE(lock->owner);
> > + if (owner)
> > + retval = owner->on_cpu;
> > rcu_re
On 07/19/2013 02:31 PM, Peter Zijlstra wrote:
mutex_can_spin_on_owner() is broken in that it would allow the compiler
to load lock->owner twice, seeing a pointer first time and a MULL
pointer the second time.
Signed-off-by: Peter Zijlstra
Reviewed-by: Rik van Riel
--
All rights reversed
--
On 07/19/2013 02:31 PM, Peter Zijlstra wrote:
mutex_can_spin_on_owner() is broken in that it would allow the compiler
to load lock->owner twice, seeing a pointer first time and a MULL
pointer the second time.
Signed-off-by: Peter Zijlstra
---
kernel/mutex.c | 6 --
1 file changed, 4 inser
On Fri, 2013-07-19 at 20:31 +0200, Peter Zijlstra wrote:
> mutex_can_spin_on_owner() is broken in that it would allow the compiler
> to load lock->owner twice, seeing a pointer first time and a MULL
> pointer the second time.
>
> Signed-off-by: Peter Zijlstra
Yep, I remember this from the rwsem
mutex_can_spin_on_owner() is broken in that it would allow the compiler
to load lock->owner twice, seeing a pointer first time and a MULL
pointer the second time.
Signed-off-by: Peter Zijlstra
---
kernel/mutex.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/mu
9 matches
Mail list logo