Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1446581rwd; Thu, 8 Jun 2023 18:57:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fwNUtocMm2JYJUeuHTWnofxRAX+aOxLiJP/qVMC6yYpbdazCRrUQbWfMGACv15s3yCHAv X-Received: by 2002:a17:903:32ca:b0:1b2:1ee9:682 with SMTP id i10-20020a17090332ca00b001b21ee90682mr82862plr.23.1686275842165; Thu, 08 Jun 2023 18:57:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686275842; cv=none; d=google.com; s=arc-20160816; b=YfzagvDVxf61Y8I1NIMZFVTJ8tleRHfevHAnD2rJQRpkLWHNASL9clUWDToZRpSR8M +ZuHkQdh0arWWVeOClmImNgWBZXbN+Wgxh6cxJwBOlR3J2VZJXukkzWusLFJpiePKvk4 ytwYav+BQ/0kxWj7CbAmuqwt0SrTwpcG4JtNheA0lQblL5Q7bUK+yCsfB6bK85zXKBKd Wz+NC7IAKG3yJIk0rvLy6h28ydAayMwK9gbos4MYs2zp+91sDLRk4HsHsFjNzj8GUj2l xGJGARQUs4ikDig37U5iBQHL6pNrtvEfAIUy601oswJ0JbykplhBpS80vqfUOM1VZLjI /nsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=3KTDoQQSpcjB9NQiyOQFUXOX88v07BrrKabYvpMIx6w=; b=X9yMKZ8aEi/dEvxPuU2IN9Bd230FTMaismsQpnVdkYq+lKptopCxFc8MxCFFUPvS5C bo2lA1nfMVRg7SKLO8V/CWv095IBbZIImBrUWKbXBne9IyLa+UT4zPPKHfB1R5/I9/Qt qJaTQCHa1t85h7oYhI7sfGB6iXok4aSGi0eJpK55E7nDqflj22XkIcCDFcJxgIwW7FJE wr2haXVL5t+YxKJdSxO5nVJsag/6d1XAPIOQv6I2k6j2J9ZROCYfAGcoVuwugGYpLcHj QbPeSrxsIo/jQGhSs3Zi35rjvlTVHzCssCkxidPG/4S5+Gw3fmzsNox9VZnv4IufVHI6 dgiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=PhwpDxcj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a17090301c700b001b1cdef2654si1849384plh.645.2023.06.08.18.57.08; Thu, 08 Jun 2023 18:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=PhwpDxcj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237276AbjFIBX1 (ORCPT + 99 others); Thu, 8 Jun 2023 21:23:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39586 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjFIBXZ (ORCPT ); Thu, 8 Jun 2023 21:23:25 -0400 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A694F18D for ; Thu, 8 Jun 2023 18:23:24 -0700 (PDT) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-565c7399afaso11693017b3.1 for ; Thu, 08 Jun 2023 18:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686273804; x=1688865804; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=3KTDoQQSpcjB9NQiyOQFUXOX88v07BrrKabYvpMIx6w=; b=PhwpDxcjLXiR7MGVaWKfABLE3dmRB3qka2k6U1l+muDGzWLhomU4qiQ57KmT6VH8qY ACB3DayhC4faseiipd0QCNLUtNtuFH3XTvyWMyC+FvmNiYj2hTBmc8pdfyd4XFmOfbWU tZooxmyCXH+STIuVMaRhFjnJtSpEto0Mxch6xRdf+bo4VO2G6a/c8gheC2mOEmzSx5zk ccYQOeUWSm1v0s9lMRW9nRmwt5CbXGDSvPCaqv/QLtUPzWt0If7EQ4o8TmUAMcKVROe3 I5HEpFf63MgdvN7DdkYJ8qdg2z230og4tgBl+c7UnWgkZm/cRQnWkzi++q5rmkDVXcaG 0vug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686273804; x=1688865804; 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=3KTDoQQSpcjB9NQiyOQFUXOX88v07BrrKabYvpMIx6w=; b=GiZd0qIQHOl9r87QXH+ZzsjIRWiv+KvxNhYDHhmgudyKY22riOcjdH3NFHbUdJD/SC 3jg/7wMfqW9hKKhIgzUvde/s9fG3pj39i/HCdw4FEfYUv03qHXVxCqS9DOhYnD20bXBs Ccth8W1bMF4xm0s+mtcvuCaIzjVv5ii1QShydMK60JDjmSALoAbd1c4SnRGiJ5DTrg2A bcr8anlJasdgiBp8wrc1747ZLZH9IoDdPFxyBhHtNCCPjTMIHX6fzO/9Rd+Y4GIpfzrf XxMXoei1MN3D1sJKckPrL0QHpx9UYnM34Nx83hD7XvlkYShA8i/NxuOLfYixT6bwWPnV ySMA== X-Gm-Message-State: AC+VfDxr8usE8FyZufSo6SSZXNUpodEWKNsI8b7L+KdektYVD8M2hOVG pj7+jsCxNDdOkaPwnyX/w1Cu8g== X-Received: by 2002:a81:6743:0:b0:568:f9f0:b057 with SMTP id b64-20020a816743000000b00568f9f0b057mr1198700ywc.26.1686273803806; Thu, 08 Jun 2023 18:23:23 -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 i11-20020a0ddf0b000000b00568ab5dd873sm288724ywe.65.2023.06.08.18.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jun 2023 18:23:23 -0700 (PDT) Date: Thu, 8 Jun 2023 18:23:19 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Xu , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Lorenzo Stoakes , Huang Ying , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Jason Gunthorpe , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Ryan Roberts , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 13/32] mm/hmm: retry if pte_offset_map() fails In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hmm_vma_walk_pmd() is called through mm_walk, but already has a goto again loop of its own, so take part in that if pte_offset_map() fails. Signed-off-by: Hugh Dickins Reviewed-by: Alistair Popple --- mm/hmm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/hmm.c b/mm/hmm.c index e23043345615..b1a9159d7c92 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -381,6 +381,8 @@ static int hmm_vma_walk_pmd(pmd_t *pmdp, } ptep = pte_offset_map(pmdp, addr); + if (!ptep) + goto again; for (; addr < end; addr += PAGE_SIZE, ptep++, hmm_pfns++) { int r; -- 2.35.3