Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-06 Thread Davidlohr Bueso
On Thu, 05 Jul 2018, Andrew Morton wrote: On Thu, 5 Jul 2018 17:12:36 +0200 Manfred Spraul wrote: Hi Dmitry, On 07/05/2018 10:36 AM, Dmitry Vyukov wrote: > [...] > Hi Manfred, > > The series looks like a significant improvement to me. Thanks! > > I feel that this code can be further simplif

Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-05 Thread Andrew Morton
On Thu, 5 Jul 2018 17:12:36 +0200 Manfred Spraul wrote: > Hi Dmitry, > > On 07/05/2018 10:36 AM, Dmitry Vyukov wrote: > > [...] > > Hi Manfred, > > > > The series looks like a significant improvement to me. Thanks! > > > > I feel that this code can be further simplified (unless I am missing > >

Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-05 Thread Dmitry Vyukov
On Thu, Jul 5, 2018 at 5:12 PM, Manfred Spraul wrote: > Hi Dmitry, > > On 07/05/2018 10:36 AM, Dmitry Vyukov wrote: >> >> [...] >> Hi Manfred, >> >> The series looks like a significant improvement to me. Thanks! >> >> I feel that this code can be further simplified (unless I am missing >> somethin

Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-05 Thread Manfred Spraul
Hi Dmitry, On 07/05/2018 10:36 AM, Dmitry Vyukov wrote: [...] Hi Manfred, The series looks like a significant improvement to me. Thanks! I feel that this code can be further simplified (unless I am missing something here). Please take a look at this version: https://github.com/dvyukov/linux/c

Re: [PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-05 Thread Dmitry Vyukov
On Thu, Jul 5, 2018 at 7:59 AM, Manfred Spraul wrote: > ipc_addid() initializes kern_ipc_perm.seq after having called > ipc_idr_alloc(). > > Thus a parallel semop() or msgrcv() that uses ipc_obtain_object_check() > may see an uninitialized value. > > The patch moves the initialization of kern_ipc_

[PATCH 2/6] ipc: reorganize initialization of kern_ipc_perm.seq

2018-07-04 Thread Manfred Spraul
ipc_addid() initializes kern_ipc_perm.seq after having called ipc_idr_alloc(). Thus a parallel semop() or msgrcv() that uses ipc_obtain_object_check() may see an uninitialized value. The patch moves the initialization of kern_ipc_perm.seq before the calls of ipc_idr_alloc(). Notes: 1) This patch