Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp357606pxh; Wed, 10 Nov 2021 02:59:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUrx/gcJdlNiGP0bt4FMLOspdEKu4bRui4krOabWa1iX7Y6roiFlQAI1c+7xNYhW8SMR3L X-Received: by 2002:a17:907:869e:: with SMTP id qa30mr18478324ejc.356.1636541942826; Wed, 10 Nov 2021 02:59:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636541942; cv=none; d=google.com; s=arc-20160816; b=GyaY2hxClptTKUHjdH6kYJ0j44mRbH5gdaR79bQzy7UTvWTfqhvA8W/o3JPDRTRYWC JdFFTgWfMxk3HxEd9zOY9/BSu5L357z0nSAP9Xz04bqT5jZGgMWRA0HbCu9BuMeIbbxS YKzjo8cPp13joEEbfn78Yr0mUrDZzMu98LXMPd5V0MaJbkZffxMwh/hHL4BVa/WxthPw komp+zc7gxXxpuqY0CtEA+ciHToJg/+v21dvBIcY9VqJv6tqvJ4bYOHqbYQQmPC8dsSh ApDYxkyuK+UdZeqKJOVkJkuzZSzp9fAJA7V2SxErSYIrhmST9qEVLtvd10bQrou/2ZEo d2Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=IGTjS9X6O5MHDP8mauZ+DA3PMqh0e9FVGxEeR+4xDgM=; b=EnCeS8f2wrpiKdodBZT5Bb7D+c1LaKwzreYzI7jxCdUhTmq/ctrMe5vCQikYdKzPWF aZ5wFFwpF1Qk/R3pi0c8jfeNLESSNk7/ItcU4lQQIXfh1RWj6TetXOtD4cYSmRQDVZDT ZXpC6Cv6BJJcH/uHTULEzX8XijF+ZLN+EliugTXn9kWs4D+LfauPZgCJdYxhfe4HBgEO ONm5cKx6YLqQxlU57XcNXqp0l+ODFPbaFFRCMPJG6rcX73DlYVK1348XhzdShc1nT3zE W8ejmK5PmTYUoOdULOtns+8e5YKkZK6EYUdvbfgbDJyhOmUHOrt06IbDykuxDM1Nw/ie i6qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=4E9Pf+Ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si55125519edd.240.2021.11.10.02.58.30; Wed, 10 Nov 2021 02:59:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=4E9Pf+Ux; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231446AbhKJK6p (ORCPT + 99 others); Wed, 10 Nov 2021 05:58:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231466AbhKJK6h (ORCPT ); Wed, 10 Nov 2021 05:58:37 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFE09C061767 for ; Wed, 10 Nov 2021 02:55:49 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id b4so1904642pgh.10 for ; Wed, 10 Nov 2021 02:55:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IGTjS9X6O5MHDP8mauZ+DA3PMqh0e9FVGxEeR+4xDgM=; b=4E9Pf+Ux5qiQPyaFELQIdPxWMnKZJis8IWSE3myEyTQTg/ZtXTEmfRj3+xgUYIKqib Amlin7VFQFJ9UH4YWXcbd66LmFZ/Q9HAZ5JznNQb+3eNmtOtBwcniA9rtqgofz2RADaL 3Oevl51wrxppp12TRgvXM83uKsKWlYYvY8hlOln+RIeSnCMzVcMIHjohuG1S/zRLiFAv ifCPerwpG9LO3xn1O7DQl4FAghQmnMGyHsvN7iFTnEDcx0kk+rI4Joggpghut/u+jQr3 dtHkRy2LcimFnQELgVdilPLogAAqcEJ82I/jvSP8xHasm/HtgQ4udpeHg91Uubpsow6a RufA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IGTjS9X6O5MHDP8mauZ+DA3PMqh0e9FVGxEeR+4xDgM=; b=VKGDXLGuNicV2KJkQpns4fHAxHK71QqMOULeo6iFAc4V5fNyyH229LJbSieROK6SZS JUdzgOP1zN2ZXNJEosmKc08O7krI/1VGswE3x+iODffi3XMxe180eJ2jCgaLED9CfQX3 jJVejSsifZwpXBwOK891mbn2cMTUsn/gIKwl/zyVZP9dz+vk+l7RW1rQxR5uYXJKw7yj rBYnpZpD8rVStqtJSznTdOTl67z2PDJY/sTTvixplg8Fghe+Sb1KHLaqlGl5xU95eEIK /9NGtlRoilcXDOBDQT6vH5Zu3qh4o+ewh4TncxZlTG/cwXVOgEoKGd7OTCTMv7M2NN8Y XqzQ== X-Gm-Message-State: AOAM532hzQd7bMumJr1RfoWY1v3lg9H3l9BMYXf/g8P9UQZtUaeDLHdY K+TBZkEYNNSbyXgXhbMmoofSvQ== X-Received: by 2002:a62:16c7:0:b0:49f:a6cc:c77d with SMTP id 190-20020a6216c7000000b0049fa6ccc77dmr15313549pfw.23.1636541749492; Wed, 10 Nov 2021 02:55:49 -0800 (PST) Received: from C02DW0BEMD6R.bytedance.net ([139.177.225.251]) by smtp.gmail.com with ESMTPSA id v38sm5865829pgl.38.2021.11.10.02.55.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Nov 2021 02:55:49 -0800 (PST) From: Qi Zheng To: akpm@linux-foundation.org, tglx@linutronix.de, kirill.shutemov@linux.intel.com, mika.penttila@nextfour.com, david@redhat.com, jgg@nvidia.com Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, songmuchun@bytedance.com, zhouchengming@bytedance.com, Qi Zheng Subject: [PATCH v3 12/15] mm/pte_ref: update the pmd entry in move_normal_pmd() Date: Wed, 10 Nov 2021 18:54:25 +0800 Message-Id: <20211110105428.32458-13-zhengqi.arch@bytedance.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) In-Reply-To: <20211110105428.32458-1-zhengqi.arch@bytedance.com> References: <20211110105428.32458-1-zhengqi.arch@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The ->pmd member record the pmd entry that maps the user PTE page table page. When the pmd entry changes, ->pmd needs to be updated synchronously. Signed-off-by: Qi Zheng --- mm/mremap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/mremap.c b/mm/mremap.c index 088a7a75cb4b..4661cdec79dc 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -278,6 +278,7 @@ static bool move_normal_pmd(struct vm_area_struct *vma, unsigned long old_addr, VM_BUG_ON(!pmd_none(*new_pmd)); pmd_populate(mm, new_pmd, pmd_pgtable(pmd)); + pte_update_pmd(pmd, new_pmd); flush_tlb_range(vma, old_addr, old_addr + PMD_SIZE); if (new_ptl != old_ptl) spin_unlock(new_ptl); -- 2.11.0