From patchwork Tue Jul 25 21:23:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 9863809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 709416038C for ; Tue, 25 Jul 2017 21:23:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 592A91FFB9 for ; Tue, 25 Jul 2017 21:23:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DF99212BE; Tue, 25 Jul 2017 21:23:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3F6C1FFB9 for ; Tue, 25 Jul 2017 21:23:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbdGYVXj (ORCPT ); Tue, 25 Jul 2017 17:23:39 -0400 Received: from simcoe208srvr.owm.bell.net ([184.150.200.208]:54350 "EHLO torfep02.bell.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752502AbdGYVXh (ORCPT ); Tue, 25 Jul 2017 17:23:37 -0400 Received: from bell.net torfep02 184.150.200.158 by torfep02.bell.net with ESMTP id <20170725212335.BOVQ11720.torfep02.bell.net@torspm01.bell.net> for ; Tue, 25 Jul 2017 17:23:35 -0400 Received: from [192.168.2.25] (really [70.31.74.123]) by torspm01.bell.net with ESMTP id <20170725212335.NCCA32108.torspm01.bell.net@[192.168.2.25]>; Tue, 25 Jul 2017 17:23:35 -0400 From: John David Anglin Mime-Version: 1.0 (Apple Message framework v1085) Date: Tue, 25 Jul 2017 17:23:35 -0400 Subject: [PATCH] parisc: Extend disabled preemption in copy_user_page Cc: Helge Deller , James Bottomley To: Parisc List Message-Id: <79E317F6-20E4-4ACE-BB0D-72D628BD3467@bell.net> X-Mailer: Apple Mail (2.1085) X-Cloudmark-Analysis: v=2.2 cv=e4fpceh/ c=1 sm=0 tr=0 a=CP4CeFkTTpGPfaygvaSIJA==:17 a=G3gG6ho9WtcA:10 a=FBHGMhGWAAAA:8 a=XRnlUAmB2C0YL8iAtEgA:9 a=CjuIK1q_8ugA:10 a=ATlVsGG5QSsA:10 a=DBn81nEWVeH-rxyFwC8A:9 a=Ld372NDzu18A:10 a=CTwWI_8SlGQyalyz8_QA:9 a=9gvnlMMaQFpL9xblJ6ne:22 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It's always bothered me that we only disable preemption in copy_user_page around the call to flush_dcache_page_asm. This patch extends this to after the copy. Signed-off-by: John David Anglin --- John David Anglin dave.anglin@bell.net diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index c32a09095216..85a92db70afc 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c @@ -453,8 +453,8 @@ void copy_user_page(void *vto, void *vfrom, unsigned long vaddr, before it can be accessed through the kernel mapping. */ preempt_disable(); flush_dcache_page_asm(__pa(vfrom), vaddr); - preempt_enable(); copy_page_asm(vto, vfrom); + preempt_enable(); } EXPORT_SYMBOL(copy_user_page);