Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Manfred Spraul
Hi Rafael, On 12/18/2013 06:34 PM, Rafael Aquini wrote: Folks, Before I re-submit the v3 with the commentary changes requested, I'm pasting here what I'm planning to amend to v2 patch: --- diff --git a/ipc/sem.c b/ipc/sem.c index ed0057a..23379b6 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1846,

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Rafael Aquini
On Wed, Dec 18, 2013 at 07:46:27AM -0800, Davidlohr Bueso wrote: > On Wed, 2013-12-18 at 10:51 -0200, Rafael Aquini wrote: > > On Wed, Dec 18, 2013 at 01:11:29PM +0100, Manfred Spraul wrote: > > > On 12/18/2013 12:28 AM, Rafael Aquini wrote: > > > >After the locking semantics for the SysV IPC API g

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Rafael Aquini
On Wed, Dec 18, 2013 at 07:46:27AM -0800, Davidlohr Bueso wrote: > On Wed, 2013-12-18 at 10:51 -0200, Rafael Aquini wrote: > > On Wed, Dec 18, 2013 at 01:11:29PM +0100, Manfred Spraul wrote: > > > On 12/18/2013 12:28 AM, Rafael Aquini wrote: > > > >After the locking semantics for the SysV IPC API g

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Davidlohr Bueso
On Wed, 2013-12-18 at 10:51 -0200, Rafael Aquini wrote: > On Wed, Dec 18, 2013 at 01:11:29PM +0100, Manfred Spraul wrote: > > On 12/18/2013 12:28 AM, Rafael Aquini wrote: > > >After the locking semantics for the SysV IPC API got improved, a couple of > > >IPC_RMID race windows were opened because w

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Rafael Aquini
On Wed, Dec 18, 2013 at 10:50:59AM -0200, Rafael Aquini wrote: > On Wed, Dec 18, 2013 at 01:11:29PM +0100, Manfred Spraul wrote: > > On 12/18/2013 12:28 AM, Rafael Aquini wrote: > > >After the locking semantics for the SysV IPC API got improved, a couple of > > >IPC_RMID race windows were opened be

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Rafael Aquini
On Wed, Dec 18, 2013 at 01:11:29PM +0100, Manfred Spraul wrote: > On 12/18/2013 12:28 AM, Rafael Aquini wrote: > >After the locking semantics for the SysV IPC API got improved, a couple of > >IPC_RMID race windows were opened because we ended up dropping the > >'kern_ipc_perm.deleted' check perform

Re: [PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-18 Thread Manfred Spraul
On 12/18/2013 12:28 AM, Rafael Aquini wrote: After the locking semantics for the SysV IPC API got improved, a couple of IPC_RMID race windows were opened because we ended up dropping the 'kern_ipc_perm.deleted' check performed way down in ipc_lock(). The spotted races got sorted out by re-introdu

[PATCH v2] ipc: introduce ipc_valid_object() helper to sort out IPC_RMID races

2013-12-17 Thread Rafael Aquini
After the locking semantics for the SysV IPC API got improved, a couple of IPC_RMID race windows were opened because we ended up dropping the 'kern_ipc_perm.deleted' check performed way down in ipc_lock(). The spotted races got sorted out by re-introducing the old test within the racy critical sect