Re: [PATCH 4/4] ipc,msg: prevent race with rmid in msgsnd,msgrcv

2013-09-26 Thread Manfred Spraul
Hi Andrew, Could you include the patch in -mm and push it towards Linus? On 09/16/2013 05:04 AM, Davidlohr Bueso wrote: This fixes a race in both msgrcv() and msgsnd() between finding the msg and actually dealing with the queue, as another thread can delete shmid underneath us if we are preempt

[PATCH 4/4] ipc,msg: prevent race with rmid in msgsnd,msgrcv

2013-09-15 Thread Davidlohr Bueso
This fixes a race in both msgrcv() and msgsnd() between finding the msg and actually dealing with the queue, as another thread can delete shmid underneath us if we are preempted before acquiring the kern_ipc_perm.lock. Manfred illustrates this nicely: Assume a preemptible kernel that is preempted