Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754930AbbFKSXx (ORCPT ); Thu, 11 Jun 2015 14:23:53 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51927 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753426AbbFKSXv (ORCPT ); Thu, 11 Jun 2015 14:23:51 -0400 Date: Thu, 11 Jun 2015 11:23:49 -0700 From: Andrew Morton To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-mml@vger.kernel.org, Andy Lutomirski , Denys Vlasenko , Brian Gerst , Peter Zijlstra , Borislav Petkov , "H. Peter Anvin" , Linus Torvalds , Oleg Nesterov , Thomas Gleixner , Waiman Long Subject: Re: [PATCH 05/12] mm: Introduce arch_pgd_init_late() Message-Id: <20150611112349.e63bf0d2116c583e51c7e881@linux-foundation.org> In-Reply-To: <1434031637-9091-6-git-send-email-mingo@kernel.org> References: <1434031637-9091-1-git-send-email-mingo@kernel.org> <1434031637-9091-6-git-send-email-mingo@kernel.org> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1130 Lines: 31 On Thu, 11 Jun 2015 16:07:10 +0200 Ingo Molnar wrote: > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -1592,6 +1592,22 @@ static struct task_struct *copy_process(unsigned long clone_flags, > syscall_tracepoint_update(p); > write_unlock_irq(&tasklist_lock); > > + /* > + * If we have a new PGD then initialize it: > + * > + * This method is called after a task has been made visible > + * on the task list already. > + * > + * Architectures that manage per task kernel pagetables > + * might use this callback to initialize them after they > + * are already visible to new updates. > + * > + * NOTE: any user-space parts of the PGD are already initialized > + * and must not be clobbered. > + */ > + if (p->mm != current->mm) > + arch_pgd_init_late(p->mm, p->mm->pgd); Couldn't this be arch_pgd_init_late(p->mm) or arch_pgd_init_late(p)? -- 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/