Message ID | 8bc72262-3771-4fbf-8738-44d9a8a1ba6a@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2103C7EE22 for <linux-mm@archiver.kernel.org>; Wed, 10 May 2023 04:56:51 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3E4356B0071; Wed, 10 May 2023 00:56:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36D0E6B0072; Wed, 10 May 2023 00:56:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 20E1C6B0074; Wed, 10 May 2023 00:56:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 108BD6B0071 for <linux-mm@kvack.org>; Wed, 10 May 2023 00:56:51 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D112CAD863 for <linux-mm@kvack.org>; Wed, 10 May 2023 04:56:50 +0000 (UTC) X-FDA: 80773135380.25.9130085 Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) by imf01.hostedemail.com (Postfix) with ESMTP id F19E14000F for <linux-mm@kvack.org>; Wed, 10 May 2023 04:56:48 +0000 (UTC) Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=r94LQDZt; spf=pass (imf01.hostedemail.com: domain of hughd@google.com designates 209.85.128.181 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683694609; a=rsa-sha256; cv=none; b=DHIx24UVivgkNJF5MkIiIZ4FDPXkksKSRYFiB9hPHDLGC7ObnV6MVVy6BC0NeJzr+lMgiF VRKH+6wbBB9L7YSd/lUWXlP3oDc7/3l92PL+ZLJZ5E3SGPCwZHoujhkxzMHgnE7L7Hp7ni RGK6KBlz3aWYTYCWzOhTTrPjACY3EBg= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=r94LQDZt; spf=pass (imf01.hostedemail.com: domain of hughd@google.com designates 209.85.128.181 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683694609; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=HSRTlLTXTCR5yk5xde2Xx4stKhpkr1eh7O/SMmicu7LOvdBqT/rvhCP+F6lRqIjMuez4Cy WEmys17GYlBMXHbbIN/Yafza0KqrQqHO9Kz/FR8wQW6+F6nbC7Gut76zj16PZnF4bCAaLu W4EFLllDY+eS2TflxuAl+MiS1Q7uPIY= Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-55b7630a736so101758507b3.1 for <linux-mm@kvack.org>; Tue, 09 May 2023 21:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1683694608; x=1686286608; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=r94LQDZtq2Ahs+pJ02XRyENxJHGD3oe8r85F2aY3lvsikc/je1Po6VKiCqGzvG34y8 kIuRE1yIIechhFDgP3aPNUwpsvddbLpTk1K5K+zsi9h4zTnxpk/JVyiDuMs9BN+OFeXh nh4AqDsTEXGceRxF3pEZTvbfDGAiIr5yaqLJ7E2ZoOdKC1Zkn5Abo0ezT8CCDEe5hzan c+lECJHpRVibRO6qY89AP62g051JuNBSBft2ut/t1eSbSZxO5Og6LOCNCOMTH+prHdN+ QRgICMzswpXaaxM5lmYItFqDFDCHtHoD+lRFcRdM6eNSSTq3389JYb3eyyNp72I0hHaA zjZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683694608; x=1686286608; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VvuiwGfmHxTbGTIrjZEu2Atjrxfj5l7d/xiFwRLchQg=; b=hO68zXTO4TlGZxr86kDW3gKPb+8ju8Pq2IXuZlSSLtOO0mSUFY4BgZfLBg37x37LMo 0N5jdLEXS7LKYCLr+7YKdSTjtKmKWJRIiX0jelCk3EVFxP+YgmFpohsB91LIcV809mAg ZQsRLg+sZKoZVtxNLhIGYP69mRnH1Su6ZbBtWJZT/7QTF1wmI3N1fC4y/vNulQhjYKTP loQCBt1rkDLqQgwkkNfgvYF1JHv0iAzVB3vu5JiHT3reCCj1mYUwgGLU7c8cNOFtHLTF zG/vuX2lIdAyAPpVC+ff7S8vlwMCYSkzJYUSm/mO+HmdotWUe4FgywxkvEemAb0SMxSW iS3g== X-Gm-Message-State: AC+VfDxk8O84ffc03wstGPNi9PcKw9CpS287gzGK+zFOWv+jhdQ97iiv kjfbh6AQyA9f8+HG8AeaGI6Rcw== X-Google-Smtp-Source: ACHHUZ7AyL+rmns/Ft/OH9KHX6GHbff2/XDcrKV9m3YxNF0ibK6GlQcG44pT8V6Ez5OWany7qS8Crw== X-Received: by 2002:a0d:db49:0:b0:55a:314d:afdc with SMTP id d70-20020a0ddb49000000b0055a314dafdcmr18425257ywe.37.1683694608059; Tue, 09 May 2023 21:56:48 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id f206-20020a816ad7000000b00559fb950d9fsm3842735ywc.45.2023.05.09.21.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 May 2023 21:56:47 -0700 (PDT) Date: Tue, 9 May 2023 21:56:44 -0700 (PDT) From: Hugh Dickins <hughd@google.com> X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton <akpm@linux-foundation.org> cc: Mike Kravetz <mike.kravetz@oracle.com>, Mike Rapoport <rppt@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Matthew Wilcox <willy@infradead.org>, David Hildenbrand <david@redhat.com>, Suren Baghdasaryan <surenb@google.com>, Qi Zheng <zhengqi.arch@bytedance.com>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Greg Ungerer <gerg@linux-m68k.org>, Michal Simek <monstr@monstr.eu>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Helge Deller <deller@gmx.de>, John David Anglin <dave.anglin@bell.net>, "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>, Michael Ellerman <mpe@ellerman.id.au>, Alexandre Ghiti <alexghiti@rivosinc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Heiko Carstens <hca@linux.ibm.com>, Christian Borntraeger <borntraeger@linux.ibm.com>, Claudio Imbrenda <imbrenda@linux.ibm.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, "David S. Miller" <davem@davemloft.net>, Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 11/23] powerpc: kvmppc_unmap_free_pmd() pte_offset_kernel() In-Reply-To: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> Message-ID: <8bc72262-3771-4fbf-8738-44d9a8a1ba6a@google.com> References: <77a5d8c-406b-7068-4f17-23b7ac53bc83@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspam-User: X-Stat-Signature: cic5jbzkopch9x7gibqrnaph5mkzk5cg X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: F19E14000F X-HE-Tag: 1683694608-319810 X-HE-Meta: U2FsdGVkX1+qMqpmi9SeM3MmgyLnLGB5MkjTHxtnsjDU2P2wIxTGaAqjjEXRdPlqSCl2dszxTGQy21rsUKQD2S4Yu/W+NjSUPjmSHqBoRNHX3mx0CSo/lNWZToolcE8BSZan1pYZOYLvitMpSsbbvvr0fP0NqnjMrMnP05hNU0Roq4D2SX0Et0Puwiut9rUQwuC4NHBv5aiViaDcaoh/p2g6mfHxlMfI5CLv6ATVYaPFF8S3uZ7/JigzWg4Dje39V7c2eRzThMPST+vLNG2bRsTQEgBg05GXlZZAL+N5BJBo59xE5S44Nt6aFI7EIswu+fhzO5yh4HwWo4vmj2xI9AcyfCrN3tLS5pFskwO0x85mym4WtlLo09vt9/bA6z1B3885jBHC2rvletN3jt+a89Lr0XoeuDz883U86YcwQOC/M5zo21VLDLDs8Rl5hPgl6svssy74mkvVUKH+ufOhhgpe1lVi2wHcLs/HTdZw+Hm7X53eFX8m0/Cx3xZJY/uLRd8LMeL2gfVO1C+fZ+lb2W6IRSsCRubDmC6cj/RmRTZfj+Oa+pVF4NCqE0d4xUyY/HSEw02dQ0XlwTQivyYUUmIw5VUcwFfgEuBpSojXZU0ED7R2X4LkfGWO14qshdQNF84yvFJ4TsV7XFe3Cchs3/F+d/NP5w3P/EmwSVwjHORGaAPOkJ/MmDstBtDl1zYJLyu78KMX/1urK7gqTlkHzFfzfE5bughy/OYcJbWq+rhJJGI2stDmK/bz6C7Hvllt5cARl4WKuoaTEE8g58SFRNxVYHESs3CFpPjTmt/dciWJZTiGm6xYUWiiy99FRvQH2s3C95GypgNLz3+qYVbVYWpasDY+L7yZdrGJ3J01xx7RVNclA76SZQDik/U707zUI+ZuUrDDKfU2GliC+QH9QEgzMcYOazW7IUJFBuPuqVRTEq+052P1vHfBue6CZyNhaDduDKX+GVtWTS1R0am k5aIaAAz MsRnlqdrmhO+klHi2b1S2rkAvDN0lPBT4xIGXLP32Pgj+sThtIVnjnPwJXPkBPzFe03B1+XX4KvQM967XAk+f2n+z2it3N+1//rZMR0/Qiufd6HJ7HMLlm5vHhBG1heEmaIDbNXgRNGsaVvCFDm0Tb7qtrT8jK/GIeYxC++cEcvsV0JOno0vociGp0xoBQFAxcsFqIH7SpabPDCwUAjCg++8sxBioIXg/F8I3Gc0bf12eqgCESC2iSqk8KCvit/DeDsMK8oqPXWg04zqizdFzZB14yqDKIJcjV4XL+DRhUaUHTDip6WqSZF8PL81cEbZNG+MqGIbnGhwus0WSzbDlrD9swDDRd/fqySCxBDs1jG0KsiFGmRQeonOF0Tuk1M/8JtEy3VI+mmzr18AGHFhvM1i9baUQmbJvUC0++cemRm5DPqPBBxpFCmUcfA== 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: <linux-mm.kvack.org> |
Series |
arch: allow pte_offset_map[_lock]() to fail
|
expand
|
diff --git a/arch/powerpc/kvm/book3s_64_mmu_radix.c b/arch/powerpc/kvm/book3s_64_mmu_radix.c index 461307b89c3a..572707858d65 100644 --- a/arch/powerpc/kvm/book3s_64_mmu_radix.c +++ b/arch/powerpc/kvm/book3s_64_mmu_radix.c @@ -509,7 +509,7 @@ static void kvmppc_unmap_free_pmd(struct kvm *kvm, pmd_t *pmd, bool full, } else { pte_t *pte; - pte = pte_offset_map(p, 0); + pte = pte_offset_kernel(p, 0); kvmppc_unmap_free_pte(kvm, pte, full, lpid); pmd_clear(p); }
kvmppc_unmap_free_pmd() use pte_offset_kernel(), like everywhere else in book3s_64_mmu_radix.c: instead of pte_offset_map(), which will come to need a pte_unmap() to balance it. But note that this is a more complex case than most: see those -EAGAINs in kvmppc_create_pte(), which is coping with kvmppc races beween page table and huge entry, of the kind which we are expecting to address in pte_offset_map() - this might want to be revisited in future. Signed-off-by: Hugh Dickins <hughd@google.com> --- arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)