From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx199.postini.com [74.125.245.199]) by kanga.kvack.org (Postfix) with SMTP id 519C16B0002 for ; Wed, 20 Feb 2013 09:24:03 -0500 (EST) Received: by mail-ie0-f169.google.com with SMTP id 13so9968306iea.14 for ; Wed, 20 Feb 2013 06:24:02 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1359699013-7160-1-git-send-email-hannes@cmpxchg.org> References: <1359699013-7160-1-git-send-email-hannes@cmpxchg.org> Date: Wed, 20 Feb 2013 22:24:02 +0800 Message-ID: Subject: Re: [patch] mm: mlock: document scary-looking stack expansion mlock chain From: Michel Lespinasse Content-Type: text/plain; charset=ISO-8859-1 Sender: owner-linux-mm@kvack.org List-ID: To: Johannes Weiner Cc: Andrew Morton , Alexander Viro , Hugh Dickins , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Fri, Feb 1, 2013 at 2:10 PM, Johannes Weiner wrote: > The fact that mlock calls get_user_pages, and get_user_pages might > call mlock when expanding a stack looks like a potential recursion. > > However, mlock makes sure the requested range is already contained > within a vma, so no stack expansion will actually happen from mlock. > > Should this ever change: the stack expansion mlocks only the newly > expanded range and so will not result in recursive expansion. > > Reported-by: Al Viro > Signed-off-by: Johannes Weiner Acked-by: Michel Lespinasse -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org