From patchwork Wed Sep 2 16:18:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 7113051 X-Patchwork-Delegate: deller@gmx.de Return-Path: X-Original-To: patchwork-linux-parisc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2ECAFBEEC1 for ; Wed, 2 Sep 2015 16:18:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 494A220515 for ; Wed, 2 Sep 2015 16:18:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 62284204E2 for ; Wed, 2 Sep 2015 16:18:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876AbbIBQS5 (ORCPT ); Wed, 2 Sep 2015 12:18:57 -0400 Received: from mout.gmx.net ([212.227.15.15]:58846 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbbIBQS4 (ORCPT ); Wed, 2 Sep 2015 12:18:56 -0400 Received: from ls3530.box ([92.203.6.179]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0M0h9K-1Yh9Bl1zeo-00uphx; Wed, 02 Sep 2015 18:18:51 +0200 Date: Wed, 2 Sep 2015 18:18:48 +0200 From: Helge Deller To: linux-parisc@vger.kernel.org Cc: Craig Estey , James Bottomley Subject: [PATCH] parisc: additionally check for in_atomic() in page fault handler Message-ID: <20150902161848.GB2444@ls3530.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:ombL0MRS6ar+7JgWqbrobGv3WTNdgiLAdFkf4RGTzuhAqFJqnly rfuylWxoHHB5fX36VicAt/DH3HKstSpsALxitk8lL0wJ2R6BUliP/im7nyAiXUYmm5gVfGo GCiRMFCQRQi+Qg0WYG8u0up8m7lt7YbFmqHPpWJWETxW8AlxAAPfLa6FaVhxEp7uRd85bdA 8mbsWFqyuTTvmd7eomT7w== X-UI-Out-Filterresults: notjunk:1; V01:K0:shNPgZbBXNo=:aMnufLe5EwmfD+G96lHYK6 hxhyNDWPRo5Qbjxovf/ovZqJbZqTi4YL96JeV7KLZo8AR2M5S1hVruv2roVeYt6QG8413A94V yoNhfrC3mHs608DkgYgHQFAu4dWgePIvrFRDuDygWBaMRSj4KpMOd2oirUByiVjKHA1hsmwxp kZZ70WiM6Qh6ww2gQgfUcz5acEXGKRjv+KR00A+kkpB5fOockmBvtIvDjOTOCFrepMRTu0nAL 4TLE76zT69IeyVbGAwSH9bjPaY8RXQW7BAhONmZidcd63FyOQqWfTDtyHy6mGAi4PPrfm1sgt AQEKcJGqyFG91iHCIUMrkH58trgdffHNVR4oCzd22TMSoSwXanxkX2FOLGd1k3F8DL+jgfgdg R16bnF/KNnuCZr4S1QBXOnlJUgliTViqva+LrrwTPCvaSkXIZeG73W9RdElpOZVxOTuUuZssY rkk/utfgkJVuX1tXe9hFZbQW1sT7ZMnq3ydA+yhMLf40F2B3AStI0HZDxymJ3uHVvT7rletm1 XXX4PvavLEfISk+hEaZBhu5UEEvtqEOZVHTNjsxVQYC9QBlZcZHo9xk0w5X626ry6LZpzduV1 9w/g7vvtIZEXRfTebK9sUNm1nmlhSjEF6OaPa/tD64DgZIlh5pdIa6FRBco8LV/q7RF8HEInb GCKrIatLGoZJrrYsEdClLlTXcN4vEo/e6rJOXZkmkYbM5K+i+X+zmDJW43pR2R2tuR+vnuWo3 1zv36YHxxEA5bZc0 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Craig Estey noticed that we didn't checked for in_atomic() in our page fault handler like other architectures. This commit adds this check by using faulthandler_disabled() which includes a check for pagefault_disabled() and in_atomic(). Reported-by: Craig Estey Signed-off-by: Helge Deller --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 15503ad..ac6f174 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c @@ -207,7 +207,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, int fault; unsigned int flags; - if (pagefault_disabled()) + if (faulthandler_disabled()) goto no_context; tsk = current;