From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by kanga.kvack.org (Postfix) with ESMTP id B9B7A6B0003 for ; Sat, 2 Jan 2016 06:33:14 -0500 (EST) Received: by mail-wm0-f41.google.com with SMTP id f206so128144344wmf.0 for ; Sat, 02 Jan 2016 03:33:14 -0800 (PST) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com. [2a00:1450:400c:c09::232]) by mx.google.com with ESMTPS id n129si118178542wmb.97.2016.01.02.03.33.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 02 Jan 2016 03:33:13 -0800 (PST) Received: by mail-wm0-x232.google.com with SMTP id f206so156188980wmf.0 for ; Sat, 02 Jan 2016 03:33:13 -0800 (PST) Subject: Re: GPF in shm_lock ipc References: <20151012122702.GC2544@node> <20151012174945.GC3170@linux-uzut.site> <20151012181040.GC6447@node> <20151012185533.GD3170@linux-uzut.site> <20151013031821.GA3052@linux-uzut.site> <20151013123028.GA12934@node> <20151105142336.46D907FD@black.fi.intel.com> From: Manfred Spraul Message-ID: <5687B576.7020303@colorfullife.com> Date: Sat, 2 Jan 2016 12:33:10 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Dmitry Vyukov , syzkaller Cc: "Kirill A. Shutemov" , Andrew Morton , Dave Hansen , Hugh Dickins , Joe Perches , sds@tycho.nsa.gov, Oleg Nesterov , "Kirill A. Shutemov" , Rik van Riel , mhocko@suse.cz, gang.chen.5i5j@gmail.com, Peter Feiner , Andrea Arcangeli , "linux-mm@kvack.org" , LKML , Kostya Serebryany , Alexander Potapenko , Andrey Konovalov , Sasha Levin Hi Dmitry, shm locking differs too much from msg/sem locking, I never looked at it in depth, so I'm not able to perform a proper review. Except for the obvious: Races that can be triggered from user space are inacceptable. Regardless if there is a BUG_ON, a WARN_ON or nothing at all. On 12/21/2015 04:44 PM, Dmitry Vyukov wrote: >> + >> +/* This is called by fork, once for every shm attach. */ >> +static void shm_open(struct vm_area_struct *vma) >> +{ >> + int err = __shm_open(vma); >> + /* >> + * We raced in the idr lookup or with shm_destroy(). >> + * Either way, the ID is busted. >> + */ >> + WARN_ON_ONCE(err); >> } Is it possible to trigger this race? Parallel IPC_RMID & fork()? -- Manfred -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org