From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751090AbdBJCZs (ORCPT ); Thu, 9 Feb 2017 21:25:48 -0500 Received: from mail-pg0-f54.google.com ([74.125.83.54]:35137 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750941AbdBJCZq (ORCPT ); Thu, 9 Feb 2017 21:25:46 -0500 Date: Thu, 9 Feb 2017 18:15:14 -0800 (PST) From: Hugh Dickins X-X-Sender: hugh@eggly.anvils To: Davidlohr Bueso cc: akpm@linux-foundation.org, manfred@colorfullife.com, linux-kernel@vger.kernel.org, Davidlohr Bueso Subject: Re: [PATCH 1/4] ipc/shm: do not check for MAP_POPULATE In-Reply-To: <1486673582-6979-2-git-send-email-dave@stgolabs.net> Message-ID: References: <1486673582-6979-1-git-send-email-dave@stgolabs.net> <1486673582-6979-2-git-send-email-dave@stgolabs.net> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Feb 2017, Davidlohr Bueso wrote: > We do not support prefaulting functionality in sysv shm, > nor MAP_NONBLOCK for that matter. Drop the pointless check > for populate in do_shmat(). I haven't checked, but are you sure that "populated" does nothing when the attacher had previously called mlockall(MCL_FUTURE)? Hugh > > Signed-off-by: Davidlohr Bueso > --- > ipc/shm.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/ipc/shm.c b/ipc/shm.c > index 06ea9ef7f54a..6b3769967789 100644 > --- a/ipc/shm.c > +++ b/ipc/shm.c > @@ -1234,8 +1234,6 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, > err = (long)addr; > invalid: > up_write(¤t->mm->mmap_sem); > - if (populate) > - mm_populate(addr, populate); > > out_fput: > fput(file); > -- > 2.6.6