Re: [PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-10-02 Thread Davidlohr Bueso
On Tue, 2013-10-01 at 06:22 +0200, Manfred Spraul wrote: > Hi Davidlohr, > > On 09/30/2013 07:54 PM, Davidlohr Bueso wrote: > > Hi Manfred, > > > > On Mon, 2013-09-30 at 11:13 +0200, Manfred Spraul wrote: > >> After acquiring the semlock spinlock, the operations must test that the > >> array is st

Re: [PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-09-30 Thread Manfred Spraul
Hi Davidlohr, On 09/30/2013 07:54 PM, Davidlohr Bueso wrote: Hi Manfred, On Mon, 2013-09-30 at 11:13 +0200, Manfred Spraul wrote: After acquiring the semlock spinlock, the operations must test that the array is still valid. - semctl() and exit_sem() would walk stale linked lists (ugly, but sh

Re: [PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-09-30 Thread Davidlohr Bueso
Hi Manfred, On Mon, 2013-09-30 at 11:13 +0200, Manfred Spraul wrote: > After acquiring the semlock spinlock, the operations must test that the > array is still valid. > > - semctl() and exit_sem() would walk stale linked lists (ugly, but should > be ok: all lists are empty) > > - semtimedop()

[PATCH] ipc/sem.c: synchronize semop and semctl with IPC_RMID

2013-09-30 Thread Manfred Spraul
After acquiring the semlock spinlock, the operations must test that the array is still valid. - semctl() and exit_sem() would walk stale linked lists (ugly, but should be ok: all lists are empty) - semtimedop() would sleep forever - and if woken up due to a signal - access memory after free.