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

2013-10-03 Thread Davidlohr Bueso
On Thu, 2013-10-03 at 15:26 +0200, Manfred Spraul wrote: > After acquiring the semlock spinlock, 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 forev

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

2013-10-03 Thread Manfred Spraul
After acquiring the semlock spinlock, 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. The