Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753947AbdLGQkz (ORCPT ); Thu, 7 Dec 2017 11:40:55 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:54734 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752623AbdLGQkv (ORCPT ); Thu, 7 Dec 2017 11:40:51 -0500 Date: Thu, 7 Dec 2017 16:40:41 +0000 From: Al Viro To: Greentime Hu Cc: greentime@andestech.com, linux-kernel@vger.kernel.org, arnd@arndb.de, linux-arch@vger.kernel.org, tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com, robh+dt@kernel.org, netdev@vger.kernel.org, deanbo422@gmail.com, devicetree@vger.kernel.org, dhowells@redhat.com, will.deacon@arm.com, daniel.lezcano@linaro.org, linux-serial@vger.kernel.org, Vincent Chen Subject: Re: [PATCH v2 06/35] nds32: MMU fault handling and page table management Message-ID: <20171207164040.GD21978@ZenIV.linux.org.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.0 (2017-09-02) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 409 Lines: 11 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().