Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbaJAQzo (ORCPT ); Wed, 1 Oct 2014 12:55:44 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25319 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751399AbaJAQzm (ORCPT ); Wed, 1 Oct 2014 12:55:42 -0400 Message-ID: <542C31E0.5040909@oracle.com> Date: Wed, 01 Oct 2014 12:54:56 -0400 From: Sasha Levin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Andrea Arcangeli , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org CC: Andres Lagar-Cavilla , Gleb Natapov , Radim Krcmar , Paolo Bonzini , Rik van Riel , Peter Zijlstra , Mel Gorman , Andy Lutomirski , Andrew Morton , Jianyu Zhan , Paul Cassella , Hugh Dickins , Peter Feiner , "Dr. David Alan Gilbert" Subject: Re: [PATCH 3/4] mm: gup: use get_user_pages_fast and get_user_pages_unlocked References: <1412153797-6667-1-git-send-email-aarcange@redhat.com> <1412153797-6667-4-git-send-email-aarcange@redhat.com> In-Reply-To: <1412153797-6667-4-git-send-email-aarcange@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrea, On 10/01/2014 04:56 AM, Andrea Arcangeli wrote: > diff --git a/mm/mempolicy.c b/mm/mempolicy.c > index 8f5330d..6606c10 100644 > --- a/mm/mempolicy.c > +++ b/mm/mempolicy.c > @@ -881,7 +881,7 @@ static int lookup_node(struct mm_struct *mm, unsigned long addr) > struct page *p; > int err; > > - err = get_user_pages(current, mm, addr & PAGE_MASK, 1, 0, 0, &p, NULL); > + err = get_user_pages_fast(addr & PAGE_MASK, 1, 0, &p); > if (err >= 0) { > err = page_to_nid(p); > put_page(p); This change looks bogus. mmap_sem might get locked in do_get_mempolicy(), and with this change we'll try locking it again in get_user_pages_fast. Thanks, Sasha -- 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/