Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758920Ab0DHS0w (ORCPT ); Thu, 8 Apr 2010 14:26:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23405 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758895Ab0DHS0v (ORCPT ); Thu, 8 Apr 2010 14:26:51 -0400 Message-ID: <4BBE1F92.3060802@redhat.com> Date: Thu, 08 Apr 2010 14:25:22 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.1 MIME-Version: 1.0 To: Linus Torvalds CC: Borislav Petkov , KOSAKI Motohiro , Andrew Morton , Minchan Kim , Linux Kernel Mailing List , Lee Schermerhorn , Nick Piggin , Andrea Arcangeli , Hugh Dickins , sgunderson@bigfoot.com, hannes@cmpxchg.org Subject: Re: [PATCH -v2] rmap: make anon_vma_prepare link in all the anon_vmas of a mergeable VMA References: <20100408101925.FB9F.A69D9226@jp.fujitsu.com> <20100408054707.GA9299@a1.tnic> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1243 Lines: 30 On 04/08/2010 10:11 AM, Linus Torvalds wrote: > > > On Thu, 8 Apr 2010, Borislav Petkov wrote: >> >> There are still issues: vma_adjust() grabs mapping->i_mmap_lock for file >> mappings while we might sleep in anon_vma_prepare(): > > Ahh. Good catch. So I can't actually do that anon_vma_prepare() thing in > __insert_vm_struct. > > It should be simple enough to just move it into the caller, just after it > releases that lock. There's only one user of that __insert_vm_struct() > anyway. You can do it yourself, or you can replace my previous patch with > this.. > > [ The patch below also makes it warn once and return SIGBUS for the case > where there is no anon_vma. I decided I still want to hear about it if > there might be some path that tries to insert a vma on its own ] Reviewed-by: Rik van Riel I haven't seen any places that insert VMAs by itself. Several strange places that allocate them, but they all appear to use the standard functions to insert them. -- 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/