Message ID | c76aa421-aec3-4cc8-cc61-4130f2e27e1@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 87330C7EE23 for <linux-mm@archiver.kernel.org>; Thu, 8 Jun 2023 19:22:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2526A8E0002; Thu, 8 Jun 2023 15:22:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 202AE8E0001; Thu, 8 Jun 2023 15:22:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CABA8E0002; Thu, 8 Jun 2023 15:22:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EFD6F8E0001 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 15:22:46 -0400 (EDT) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id C15551A0312 for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:22:46 +0000 (UTC) X-FDA: 80880552732.08.0703B1D Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by imf11.hostedemail.com (Postfix) with ESMTP id EFA464001B for <linux-mm@kvack.org>; Thu, 8 Jun 2023 19:22:44 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=5jRACtmO; spf=pass (imf11.hostedemail.com: domain of hughd@google.com designates 209.85.128.182 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=1686252165; 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=p2pRgG7qjHxzOwpMwrsZUZvDJ+2oKg+ODH2epb9nl6HLyhU1YzCFi7ruCek5p/UmX1x1I/ SUrzsT9xBRunt0hWdiUVah0EBxra1vZrWNB9ewhPoA0y0MoX6AkZQvNdaYMwdJqLbkdhUU AJhcPpCJWFOrEPDO7VEBYrqpspudS6g= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686252165; a=rsa-sha256; cv=none; b=gZJTBPlbYzE7OS3pVjvfBG3BsalpyWY/Tq0auF85hjoz0jos9VCS4TaWAt0m9YIJ4HlYVm +ihVCkjKlJp4K+BtCCbAcmb5YlyHgKno0gzJvstSddMUgzZmeay7v8FdZSMKehzjmWQYgU qusVlkcCEhMRP4EIdvZ6+vFOWrcgrEA= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=5jRACtmO; spf=pass (imf11.hostedemail.com: domain of hughd@google.com designates 209.85.128.182 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-561b7729a12so31109707b3.1 for <linux-mm@kvack.org>; Thu, 08 Jun 2023 12:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686252164; x=1688844164; 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=5jRACtmOYl24iPoTbIjNRpyUFAC/FI9lpuvtUNHnC43m7VYioQ/BjHL7bdRB1Sderj Ku/HQKtR0qPfeCfubIqZ/AIBxONFw9MhEvcLPL8cbaxLn3mTiR/nWL6P2PCLjm+BwcQW 0EgQz3QqN/pDsKtdmzyltGWnacSj5IwEptrUle8FLf/akecGFE+OR3UMPvCEsj1BvLU9 B+ORl75p95EI9Mde8VL9yv1b1t+G7YgfanAmLLFyt7bpvhgPlWiVhcJ7Ue5u8gtJ1wSb o7+vcjNZQIk2HsdRh5Pl//khJzNempIfA/Kf3RkDsGtD4+XKnKjXxiMtp0DlEfTwETu/ 3u+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686252164; x=1688844164; 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=Qg2J3dNGM28lNV5r/9zVOkW3RwhJ9GRwwqSZT+8RlU6+sHirQqlohHN+bmSisUQD0J MCmQEgcQ38KVAbUfiGhgBQNkkDqMyX+07hexJJtDryF58iLr818WBrOxZrVut6sm3Ydz Bm+z4QWHAa8dZFdO3zJJfENjMSEnP29Om0vB3BoM4z02kDQjPBnovGUL3my1yfqTDOKE jzqF2h2Qk+bjNc+xlUek/T4fSKDtHGL5qG6sLaqZRRs9lLqxptyigYaoYELeg8hrHTFK DzIuoiqruxIQNk0A38jn4whNa5BnDmzBhVVlI28xLuIbBfJEIMrY9at/TNI2bvddTy6t 0aBQ== X-Gm-Message-State: AC+VfDzhg/sI8QOx8VEXwNo32v7aDAhXZPA1bJYLRse7Gf9WEAkMW76r wtsyVp442OouD5axNEM9s3o+8Q== X-Google-Smtp-Source: ACHHUZ40hyaOIkdH7B5oJObv6N1cySgcI9o6+PKHZNW5ZVazdwvrvX10Wz2CSgkv/8emrW9KOXZU2A== X-Received: by 2002:a81:a08c:0:b0:569:ef9b:eda with SMTP id x134-20020a81a08c000000b00569ef9b0edamr823988ywg.10.1686252163900; Thu, 08 Jun 2023 12:22:43 -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 n126-20020a817284000000b00561949f713fsm118018ywc.39.2023.06.08.12.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 12:22:43 -0700 (PDT) Date: Thu, 8 Jun 2023 12:22:39 -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>, Peter Zijlstra <peterz@infradead.org>, 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>, Alexander Gordeev <agordeev@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 v2 11/23] powerpc: kvmppc_unmap_free_pmd() pte_offset_kernel() In-Reply-To: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> Message-ID: <c76aa421-aec3-4cc8-cc61-4130f2e27e1@google.com> References: <a4963be9-7aa6-350-66d0-2ba843e1af44@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Stat-Signature: idqcd78ecxmbpkypuc88dgemkobhe8w7 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: EFA464001B X-Rspam-User: X-HE-Tag: 1686252164-14950 X-HE-Meta: U2FsdGVkX18KvJJ7w273bqTfxWxMHDKjc5R70ia5zMpWFbKBZhjHsX7olOqVsPWNsasd+Gg0O7ZUfHsiIINfmcCgyaogS7m9iefNiz2dJpRSqncUEH44DkA6jgW9rfyIoLagZYK0F2adTNRTo8PZs+0AE7NRZKHfNlm3xPBoBzHX0U0v3f16m7h6OEA86X2xPckeveFyRnWFwCl7JYZQ2xG+fpMbC/hX9fGBmzl4H0D2UGAF/R6/0OeyklEQT2ZWc5ezBw72TLz4+rqGAIAZdRZFPFHaaM6thr2lupYcB6VGgnGpFecyQhleHiR3Uz+o6WqycrN2ZnV9+J9wJgcm7AWXSWOkpsOSC4bRbKcnd8h+OcIgMqb6gNNsHfiM7/SlZMjtlIwxVreh/7Jx0jxsSf2V3zVz6g3r96/6w9LBUWF4BfbzERITQaNujGBwHKDDPEo41ASOROLdtJDxrFcH+r5EAyzulU6GUP9FTRXJON/YUSbCsCntgPp0XPC/9OL+vT+5FkQ2uh9s9s8rTpCOfLUtJu7kM77io1uC6klJ+MViD8SeUjV3M5nl3JOPmWbf/2Y/6iuzW3I3VukUVN6lkrbe37yAwiHzf0BbuLhGwiwzDzenoiydXPnCdrN5EO41Jh6HhSlTrW3dw7iBuysCibz2Us3dIU951YbOJtu3khv/8IDbvVLL32ZSo3ifHvewdZWV3o37sEA4fxvkbC3rS6WDGV7oAVNh8advy3do3vPyaKZaCaEAvPQywgvY93xOx07+7rWcIzE47D0RmTZT2xA1BV4sClqsCeJDz1oeL5Ib2lpsmVfBWcsyUzQsLkxfEJ5X24gdY7kVo6vt8QRElZKNpM2nmsZmwLr47VrxBQUZjhQ5xJ71WLsy9I15h4yE7C/IbjiINs7as0ErsbVVf42bJTTlj+dgPxHs4il3Pv/EOI9/6c8mAwFwXqLhTrP6kPZW7iD+hdNWC9ojOU9 P3JzMFOZ 98g5Jl7y903+SGxwRq6uFT98tSG3uA3562r4FbQy+Z2hl8M7iw0D3edf26sPVGgDhqyDlJDmh1iNcj1E6KiK+gStRwwk6m9HyFM9MFmMsZ/TO1w4sYjrR8+mnMeNbA0M5XT/Xuh0AOIU98guFQmkQmxfMBsd6mcruqBU0ZtN6pokg9r4702SViN3cJ+wL8UnCP2neOyIWQr4pT7QyRm66ljvpnXSiqU+Lf4Vhop8YLmRQNUAx8z6N0694Ju8iRiIV3NsHMo2N4/Eo5qEQcEtQu52LNuwwuIh+Idrw4rSJobCOBk54nPB8ve9jmCAIw5u+aWGTqCcvEe0ZmcMqChO9WS6bN9o2jIlh4s13UKNYQ4r86ifrYTr+p5s/1YUHMOk14EkUuzgNbvnDXFlYPajHz8CouKbhcXKx6Dn5wiSix+W+RNdz1ualWI8gBQ== 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(-)