Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-28 Thread Will Deacon
On Fri, Feb 28, 2014 at 12:50:06PM +, Peter Hurley wrote: > On 02/28/2014 07:13 AM, Will Deacon wrote: > > diff --git a/include/asm-generic/rwsem.h b/include/asm-generic/rwsem.h > > index 603a0a11e592..2b6401f9e428 100644 > > --- a/include/asm-generic/rwsem.h > > +++

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-28 Thread Peter Hurley
On 02/28/2014 07:13 AM, Will Deacon wrote: On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: The asm-generic rwsem implementation directly acceses sem->cnt when performing a __down_read_trylock operation. Whilst this is

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-28 Thread Will Deacon
On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: > On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: > > The asm-generic rwsem implementation directly acceses sem->cnt when > > performing a __down_read_trylock operation. Whilst this is probably safe > > on all architectures, we

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-28 Thread Will Deacon
On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: The asm-generic rwsem implementation directly acceses sem-cnt when performing a __down_read_trylock operation. Whilst this is probably safe on all architectures, we should

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-28 Thread Peter Hurley
On 02/28/2014 07:13 AM, Will Deacon wrote: On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: The asm-generic rwsem implementation directly acceses sem-cnt when performing a __down_read_trylock operation. Whilst this is

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-28 Thread Will Deacon
On Fri, Feb 28, 2014 at 12:50:06PM +, Peter Hurley wrote: On 02/28/2014 07:13 AM, Will Deacon wrote: diff --git a/include/asm-generic/rwsem.h b/include/asm-generic/rwsem.h index 603a0a11e592..2b6401f9e428 100644 --- a/include/asm-generic/rwsem.h +++ b/include/asm-generic/rwsem.h @@

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-27 Thread Will Deacon
On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: > On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: > > The asm-generic rwsem implementation directly acceses sem->cnt when > > performing a __down_read_trylock operation. Whilst this is probably safe > > on all architectures, we

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-27 Thread Will Deacon
On Thu, Feb 27, 2014 at 05:28:24AM +, Davidlohr Bueso wrote: On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: The asm-generic rwsem implementation directly acceses sem-cnt when performing a __down_read_trylock operation. Whilst this is probably safe on all architectures, we should

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-26 Thread Davidlohr Bueso
On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: > The asm-generic rwsem implementation directly acceses sem->cnt when > performing a __down_read_trylock operation. Whilst this is probably safe > on all architectures, we should stick to the atomic_long_* API and use > atomic_long_read

Re: [PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-26 Thread Davidlohr Bueso
On Fri, 2014-02-21 at 17:22 +, Will Deacon wrote: The asm-generic rwsem implementation directly acceses sem-cnt when performing a __down_read_trylock operation. Whilst this is probably safe on all architectures, we should stick to the atomic_long_* API and use atomic_long_read instead.

[PATCH 1/2] asm-generic: rwsem: ensure sem->cnt is only accessed via atomic_long_*

2014-02-21 Thread Will Deacon
The asm-generic rwsem implementation directly acceses sem->cnt when performing a __down_read_trylock operation. Whilst this is probably safe on all architectures, we should stick to the atomic_long_* API and use atomic_long_read instead. Signed-off-by: Will Deacon ---

[PATCH 1/2] asm-generic: rwsem: ensure sem-cnt is only accessed via atomic_long_*

2014-02-21 Thread Will Deacon
The asm-generic rwsem implementation directly acceses sem-cnt when performing a __down_read_trylock operation. Whilst this is probably safe on all architectures, we should stick to the atomic_long_* API and use atomic_long_read instead. Signed-off-by: Will Deacon will.dea...@arm.com ---