From patchwork Mon May 18 18:48:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 1292735 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20170209 header.b=beKVUjnC; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Qp2M6vfJz9sT4 for ; Tue, 19 May 2020 04:48:59 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+mAtoHFvZ///oH9sty0248UnJNe+AG7uS+GXUokgQgs=; b=beKVUjnCyq7oyP JYHxVDT+1o8fz9Ukc7J9/p90WL4dZJ/CKEbUraLOk8ZWkCFpJHpEWj4jKe/potnqXcXj5mkSWbhES ZCDytfO8UMmk1A9v0T14iXtgvuzyvw/lj+5jBK2CpbHeDOy1RxY+8UXhnwS120mfEbQtLRjiNz+FX wQlbZ3xmhuUeNRbilAnmSG5j7cgJr6FVsnWDF2KHs0bk1lPzkKLXJZDrSC++ZvYE+TWXbthKamCVK ZVNsemN3USjcmtWc8G+in0yqtLKiAA1fm2f7NAq+X8+R+phBPxPo3Xjs3RuF1C1LAD88jw9i7AcDX F9bd+X3XKL6h9fjP9NQw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jakor-0006AZ-Vf; Mon, 18 May 2020 18:48:58 +0000 Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jakog-000612-85; Mon, 18 May 2020 18:48:47 +0000 IronPort-SDR: W+n+j62ZVz7wDhHU32E/B4YDHQEKkeyAKsfTbuy47CRsK1B3XLU+ro9lFDu3PmwbC1/Oc8UtSG xpfsG4xQaooA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 11:48:45 -0700 IronPort-SDR: A0dNOJcp3XVBRer+3SvVGXusda3bUk5OmiTTHwwN4BXAPX4zWgYa/kiDwvCtGSiDC+7pgbW2fC b75hGkYrg3kw== X-IronPort-AV: E=Sophos;i="5.73,407,1583222400"; d="scan'208";a="253140387" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 11:48:45 -0700 From: ira.weiny@intel.com To: linux-kernel@vger.kernel.org, Andrew Morton , Guenter Roeck Subject: [PATCH] arch/{mips, sparc, microblaze, powerpc}: Don't enable pagefault/preempt twice Date: Mon, 18 May 2020 11:48:43 -0700 Message-Id: <20200518184843.3029640-1-ira.weiny@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200507150004.1423069-8-ira.weiny@intel.com> References: <20200507150004.1423069-8-ira.weiny@intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_114846_301139_B0C97CA0 X-CRM114-Status: GOOD ( 10.48 ) X-Spam-Score: -5.0 (-----) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-5.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [192.55.52.115 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Zijlstra , Benjamin Herrenschmidt , Dave Hansen , dri-devel@lists.freedesktop.org, "James E.J. Bottomley" , Max Filippov , Paul Mackerras , "H. Peter Anvin" , sparclinux@vger.kernel.org, Ira Weiny , Thomas Gleixner , Helge Deller , x86@kernel.org, linux-csky@vger.kernel.org, Christoph Hellwig , Ingo Molnar , linux-snps-arc@lists.infradead.org, linux-xtensa@linux-xtensa.org, Borislav Petkov , Al Viro , Andy Lutomirski , Dan Williams , linux-arm-kernel@lists.infradead.org, Chris Zankel , Thomas Bogendoerfer , linux-parisc@vger.kernel.org, linux-mips@vger.kernel.org, Christian Koenig , linuxppc-dev@lists.ozlabs.org, "David S. Miller" Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ira Weiny The kunmap_atomic clean up failed to remove one set of pagefault/preempt enables when vaddr is not in the fixmap. Fixes: bee2128a09e6 ("arch/kunmap_atomic: consolidate duplicate code") Signed-off-by: Ira Weiny Signed-off-by: Mike Rapoport --- arch/microblaze/mm/highmem.c | 5 +---- arch/mips/mm/highmem.c | 5 +---- arch/powerpc/mm/highmem.c | 5 +---- arch/sparc/mm/highmem.c | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/arch/microblaze/mm/highmem.c b/arch/microblaze/mm/highmem.c index ee8a422b2b76..92e0890416c9 100644 --- a/arch/microblaze/mm/highmem.c +++ b/arch/microblaze/mm/highmem.c @@ -57,11 +57,8 @@ void kunmap_atomic_high(void *kvaddr) int type; unsigned int idx; - if (vaddr < __fix_to_virt(FIX_KMAP_END)) { - pagefault_enable(); - preempt_enable(); + if (vaddr < __fix_to_virt(FIX_KMAP_END)) return; - } type = kmap_atomic_idx(); diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c index 37e244cdb14e..8e8726992720 100644 --- a/arch/mips/mm/highmem.c +++ b/arch/mips/mm/highmem.c @@ -41,11 +41,8 @@ void kunmap_atomic_high(void *kvaddr) unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; int type __maybe_unused; - if (vaddr < FIXADDR_START) { // FIXME - pagefault_enable(); - preempt_enable(); + if (vaddr < FIXADDR_START) return; - } type = kmap_atomic_idx(); #ifdef CONFIG_DEBUG_HIGHMEM diff --git a/arch/powerpc/mm/highmem.c b/arch/powerpc/mm/highmem.c index 35071c2913f1..624b4438aff9 100644 --- a/arch/powerpc/mm/highmem.c +++ b/arch/powerpc/mm/highmem.c @@ -44,11 +44,8 @@ void kunmap_atomic_high(void *kvaddr) { unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; - if (vaddr < __fix_to_virt(FIX_KMAP_END)) { - pagefault_enable(); - preempt_enable(); + if (vaddr < __fix_to_virt(FIX_KMAP_END)) return; - } if (IS_ENABLED(CONFIG_DEBUG_HIGHMEM)) { int type = kmap_atomic_idx(); diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c index d237d902f9c3..6ff6e2a9f9b3 100644 --- a/arch/sparc/mm/highmem.c +++ b/arch/sparc/mm/highmem.c @@ -86,11 +86,8 @@ void kunmap_atomic_high(void *kvaddr) unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK; int type; - if (vaddr < FIXADDR_START) { // FIXME - pagefault_enable(); - preempt_enable(); + if (vaddr < FIXADDR_START) return; - } type = kmap_atomic_idx();