From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756489Ab1E1X4j (ORCPT ); Sat, 28 May 2011 19:56:39 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:35084 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754852Ab1E1X4h (ORCPT ); Sat, 28 May 2011 19:56:37 -0400 MIME-Version: 1.0 In-Reply-To: References: <1306617270.2497.516.camel@laptop> From: Linus Torvalds Date: Sat, 28 May 2011 16:56:11 -0700 Message-ID: Subject: Re: [PATCH] mm: fix page_lock_anon_vma leaving mutex locked To: Hugh Dickins Cc: Peter Zijlstra , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 28, 2011 at 4:24 PM, Linus Torvalds wrote: > > That said, I do agree with the "anon_vma_root" part of your patch. I > just think you mixed up two independent issues with it: the fact that > we may be unlocking a new root, and the precise check used to > determine whether the anon_vma might have changed. Thinking some more about it, I end up agreeing with the whole patch. The "page_mapped()" test is what we use in the slow-path after incrementing the anon_vma count too when the trylock didn't work too, so it can't be too wrong. So I'm going to apply it as-is as an improvement (at least we won't be unlocking the wrong anon_vma root), and hope that you and Peter end up agreeing about what the sufficient test is for whether the anon_vma is the right one. Linus