Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759926AbZA2WeA (ORCPT ); Thu, 29 Jan 2009 17:34:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752149AbZA2Wdv (ORCPT ); Thu, 29 Jan 2009 17:33:51 -0500 Received: from extu-mxob-2.symantec.com ([216.10.194.135]:45872 "EHLO extu-mxob-2.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbZA2Wdv (ORCPT ); Thu, 29 Jan 2009 17:33:51 -0500 Date: Thu, 29 Jan 2009 22:32:54 +0000 (GMT) From: Hugh Dickins X-X-Sender: hugh@blonde.anvils To: Linus Torvalds cc: Lee Schermerhorn , linux-kernel , Maksim Yevmenkin , Nick Piggin , Andrew Morton , Greg Kroah-Hartman , will@crowder-design.com, Rik van Riel , KOSAKI Motohiro , KAMEZAWA Hiroyuki Subject: Re: [PATCH] Fix OOPS in mmap_region() when merging adjacent VM_LOCKED file segments In-Reply-To: Message-ID: References: <1233259410.2315.75.camel@lts-notebook> 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 Content-Length: 1160 Lines: 29 On Thu, 29 Jan 2009, Linus Torvalds wrote: > On Thu, 29 Jan 2009, Linus Torvalds wrote: > > > > THIS PATCH IS TOTALLY UNTESTED! Sorry, I was away yesterday, and not yet caught up with things today. I certainly agree that it would be much nicer not to allocated a vma in one place, then later throw it away on finding it can be merged: your patch looks a plausible improvement. The problem has always been that file->f_op->mmap(file, vma) on a special file can do various strange things, changing surprising fields of the struct vma passed to it, changing its mergeability. Now it may well be that every driver which does something strange there already sets one of the VM_SPECIAL flags which prevent merging, or can easily be fixed to do so, or otherwise clearly cannot pose a problem. But I need to mull it over and do some checking tomorrow: anything I say tonight, I'd probably change my mind about. Hugh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/