Re: [PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-30 Thread Davidlohr Bueso
On Wed, 18 Jul 2018, Manfred Spraul wrote: sma->use_global_lock is sometimes used with smp_load_acquire(), sometimes without. So far, I assumed that this is safe. The same applies for nf_conntrack_locks_all, in nf_conntrack_all_lock() So the netfilter code is safe wrt tearing as _all_ access

Re: [PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-20 Thread Davidlohr Bueso
On Wed, 18 Jul 2018, Manfred Spraul wrote: Hello Davidlohr, On 07/17/2018 07:26 AM, Davidlohr Bueso wrote: In order for load/store tearing to work, _all_ accesses to the variable in question need to be done around READ and WRITE_ONCE() macros. Ensure everyone does so for q->status variable for

Re: [PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-17 Thread Manfred Spraul
Hello Davidlohr, On 07/17/2018 07:26 AM, Davidlohr Bueso wrote: In order for load/store tearing to work, _all_ accesses to the variable in question need to be done around READ and WRITE_ONCE() macros. Ensure everyone does so for q->status variable for semtimedop(). What is the background of the

Re: [PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-16 Thread Davidlohr Bueso
On Mon, 16 Jul 2018, Bueso wrote: In order for load/store tearing to work, _all_ accesses to ^ prevention

[PATCH -next] ipc/sem: prevent queue.status tearing in semop

2018-07-16 Thread Davidlohr Bueso
In order for load/store tearing to work, _all_ accesses to the variable in question need to be done around READ and WRITE_ONCE() macros. Ensure everyone does so for q->status variable for semtimedop(). Signed-off-by: Davidlohr Bueso --- ipc/sem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio