Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751720AbdLHF11 (ORCPT ); Fri, 8 Dec 2017 00:27:27 -0500 Received: from mail-vk0-f66.google.com ([209.85.213.66]:41137 "EHLO mail-vk0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751027AbdLHF1Y (ORCPT ); Fri, 8 Dec 2017 00:27:24 -0500 X-Google-Smtp-Source: AGs4zMbXBVHfJOQd+QlUiKsuqaT2UEKjYr3VhFgpbgVND8IrcpVg06q1NgdGpO73hmSjVfUbM/CmKg0Lkhb2eufrtXY= MIME-Version: 1.0 In-Reply-To: <20171207164040.GD21978@ZenIV.linux.org.uk> References: <20171207164040.GD21978@ZenIV.linux.org.uk> From: Greentime Hu Date: Fri, 8 Dec 2017 13:26:42 +0800 Message-ID: Subject: Re: [PATCH v2 06/35] nds32: MMU fault handling and page table management To: Al Viro Cc: Greentime , Linux Kernel Mailing List , Arnd Bergmann , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , netdev , Vincent Chen , DTML , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 651 Lines: 17 2017-12-08 0:40 GMT+08:00 Al Viro : > On Mon, Nov 27, 2017 at 08:27:53PM +0800, Greentime Hu wrote: >> +void do_page_fault(unsigned long entry, unsigned long addr, >> + unsigned int error_code, struct pt_regs *regs) > [snip] >> + /* >> + * If we're in an interrupt or have no user >> + * context, we must not take the fault.. >> + */ >> + if (unlikely(in_atomic() || !mm)) > > Broken. in_atomic() is wrong here - it should be faulthandler_disabled(). Thanks. I will include and replace in_atomic() with faulthandler_disabled() I will fix it in the next version patch.