From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5717DC433ED for ; Thu, 8 Apr 2021 16:38:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BA43261006 for ; Thu, 8 Apr 2021 16:38:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA43261006 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 362776B0083; Thu, 8 Apr 2021 12:38:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 312F86B0085; Thu, 8 Apr 2021 12:38:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DB7F6B0087; Thu, 8 Apr 2021 12:38:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0007.hostedemail.com [216.40.44.7]) by kanga.kvack.org (Postfix) with ESMTP id 010436B0083 for ; Thu, 8 Apr 2021 12:38:46 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id ACE218248D52 for ; Thu, 8 Apr 2021 16:38:46 +0000 (UTC) X-FDA: 78009758652.11.9DE1391 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf09.hostedemail.com (Postfix) with ESMTP id 3971A6000112 for ; Thu, 8 Apr 2021 16:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=5WVQk+7P/5/ZolZaMYRuxpu9ZytNhluiUoWmCVEJDsc=; b=KQEeBTtx6kshpfwtjpcIOZ7kZn Jk2l9MjZ+3Rwmhnst1TUq/L5sDhoq1s4q/ZkReF0N5Hgx2nL9Lt8NPtgwq/I2p834f0H5Yn5gg2kk i2o3tr6bP5gisRiLeP+cDW+nr4ULN7g5gW9GHQBDDmfftizTAs8MKTME2MQzu15PpVyDrGzgAThg5 hy9Q2wTUDv+9NHc2eHXwz6lBnN8rTz8PYSAubRoCq1e7wB88Dntbm93G8YRJT5vi3391uAvOX2acO D14+mcpFg6jbYP3arN03OJpqF6DpvYwhvxWS832dLjgwcaGw0Vg5PjdIKi/B8A1y4ae0tMmSFNJiW 7anxCuAA==; Received: from willy by casper.infradead.org with local (Exim 4.94 #2 (Red Hat Linux)) id 1lUXfi-00GWrM-Cy; Thu, 08 Apr 2021 16:38:25 +0000 Date: Thu, 8 Apr 2021 17:38:22 +0100 From: Matthew Wilcox To: Liam Howlett Cc: Geert Uytterhoeven , "linux-m68k@lists.linux-m68k.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Laurent Dufour , Vlastimil Babka , Daniel Jordan , Michel Lespinasse Subject: Re: [PATCH] arch/m68k/kernel/sys_m68k: Add missing mmap_read_lock() to sys_cacheflush() Message-ID: <20210408163822.GP2531743@casper.infradead.org> References: <20210407200032.764445-1-Liam.Howlett@Oracle.com> <20210408163400.bcsmojb4ug7nnzwt@revolver> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210408163400.bcsmojb4ug7nnzwt@revolver> X-Stat-Signature: dmfks5opj47fbcc4zkyyc1kpw8gmaow9 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 3971A6000112 Received-SPF: none (infradead.org>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=casper.infradead.org; client-ip=90.155.50.34 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1617899923-689006 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 08, 2021 at 04:34:20PM +0000, Liam Howlett wrote: > When the superuser flushes the entire cache, the mmap_read_lock() is not > taken, but mmap_read_unlock() is called. Add the missing > mmap_read_lock() call. > > Fixes: cd2567b6850b (m68k: call find_vma with the mmap_sem held in > sys_cacheflush()) > Signed-off-by: Liam R. Howlett Reviewed-by: Matthew Wilcox (Oracle) Although if it's been broken since 2014, maybe the ability of the superuser to flush the entire cache is not needed any more and can be removed?