From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756828AbZBBWOn (ORCPT ); Mon, 2 Feb 2009 17:14:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752751AbZBBWOe (ORCPT ); Mon, 2 Feb 2009 17:14:34 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:50091 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbZBBWOe (ORCPT ); Mon, 2 Feb 2009 17:14:34 -0500 Date: Mon, 2 Feb 2009 14:12:30 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Mel Gorman cc: KOSAKI Motohiro , Hugh Dickins , Lee Schermerhorn , Greg KH , Maksim Yevmenkin , linux-kernel , Nick Piggin , Andrew Morton , will@crowder-design.com, Rik van Riel , KAMEZAWA Hiroyuki , Mikos Szeredi , Andy Whitcroft Subject: Re: [PATCH] Fix OOPS in mmap_region() when merging adjacent VM_LOCKED file segments In-Reply-To: <20090202215042.GD9840@csn.ul.ie> Message-ID: References: <20090202205515.EC89.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20090202224410.EC95.KOSAKI.MOTOHIRO@jp.fujitsu.com> <20090202185810.GC9840@csn.ul.ie> <20090202215042.GD9840@csn.ul.ie> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) 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 Mon, 2 Feb 2009, Mel Gorman wrote: > > Lets say someone does the following > > 1. mmap(PROT_READ, MAP_PRIVATE) on a hugetlbfs file > VM_ACCOUNT is not set for hugetlbfs > VM_NORESERVE is not set because MAP_NORESERVE was not there But isn't this exactly the thing that we have that odd "accountable" flag for, and we do the whole if (!accountable) vm_flags |= VM_NORESERVE; in mmap_region() for? So VM_NORESERVE _will_ be set. Linus