From patchwork Wed Feb 15 20:58:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13142176 Return-Path: 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 EBE4CC636CC for ; Wed, 15 Feb 2023 20:58:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 246616B0072; Wed, 15 Feb 2023 15:58:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1F62D6B0073; Wed, 15 Feb 2023 15:58:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0BE946B0074; Wed, 15 Feb 2023 15:58:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id F15EB6B0072 for ; Wed, 15 Feb 2023 15:58:09 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id BF429A110F for ; Wed, 15 Feb 2023 20:58:09 +0000 (UTC) X-FDA: 80470738698.17.60A8CCF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf05.hostedemail.com (Postfix) with ESMTP id AB0DA10000B for ; Wed, 15 Feb 2023 20:58:07 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dYf8iCTq; spf=pass (imf05.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676494687; 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:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=VA3IhoymnkRNZGYwmqaugl8AyufVG6VWORGx5RUpBQ4=; b=o2fwLr1lsOfeAq1MLTyWDlD8Putp+PEhlL8VHt3AzF5+WMzbt0g6/b8wk9GAhdT7rI04ej d5+/adxENcVQpcf4eUAkxWDFi4Rfv3cZL3vBAB4nmVo+YiW0UyB/NwRAKqbwKAQ8/3pWin ya8eZH/PSEXT782MoP1LUJi9EHusabE= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=dYf8iCTq; spf=pass (imf05.hostedemail.com: domain of peterx@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676494687; a=rsa-sha256; cv=none; b=17EUYxNQBKQWovzp9NBCU6X3G4sJX9FFiUAo33pN/Pu+xmtmotfmwPyoA7mrNc9vKu9us1 UU34u31dpPOSggUUWYd2oSOgJh2h9ojvavHSYDGmtZBX38awH8P1/byByv9odCqpf+ZmAN ex3QWv6LOXduWxppxUqkBlyFGDyD44g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676494686; h=from:from: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:content-transfer-encoding; bh=VA3IhoymnkRNZGYwmqaugl8AyufVG6VWORGx5RUpBQ4=; b=dYf8iCTqYGb+qPxi8VLNaQOPoLD2M3fPrxmBH855TldewQiDKDDdVLjEWb0eLm9FDCy/Ng OF5sCvnNPjt3BWK6mLrU0dyaofvqOaNz9JnCUCW6MxCufWqCcYo4VLRXE8HPit6TWHmyAW 9fF0VFkESejb1eSrkCrpFUELtgCQrw8= Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-587-gskDHK6OO9KGg4gBmR7jvw-1; Wed, 15 Feb 2023 15:58:03 -0500 X-MC-Unique: gskDHK6OO9KGg4gBmR7jvw-1 Received: by mail-io1-f69.google.com with SMTP id q3-20020a5edb03000000b00725625524e5so12536915iop.2 for ; Wed, 15 Feb 2023 12:58:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676494683; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VA3IhoymnkRNZGYwmqaugl8AyufVG6VWORGx5RUpBQ4=; b=gsMgkzmBcbH1SoggzovlPjGMyydjtb3iNDU+XwLoEgnHwdQgIm1rg+0kLgDL5IA0Er hGkwFrhEDoEXVp/LT/OmgybB2JNzRWT0CiWlPvBrXdmS2GpilK0OS4IHJrAjF4SVzlVy PEXc3YTgJK4wGBETwlT5yhTczYJc01gl3tmNZeGoIfVt2cHfk7yWTjAE98mgPqHRckw4 9hFSp3zws7rPRzD2iNeproVxWbjKkJ/wCHy64cf4SBFE4mCw7Y4Em6DpHxqNQpeD0nqZ /TTiPiDNFCXWO+82eGg408IHkuZxb3gG/KW9mDEpwklCOLvni9ogJRUrGn4vPnO5Fx2i swzA== X-Gm-Message-State: AO0yUKXfFppFfworwRtVSWca7C/WYXVTUxJodB7yPomeGq3ZBb1LX08w iFsj91P1Le90jkgBZwTS1LRKpRf+LObBxx/X2r9JQivrqxMu3DRd8mE2IW9JkaDX2JglikjqsKg bVa+YR0vuGNM= X-Received: by 2002:a05:6602:17ce:b0:73a:397b:e311 with SMTP id z14-20020a05660217ce00b0073a397be311mr2559563iox.0.1676494683257; Wed, 15 Feb 2023 12:58:03 -0800 (PST) X-Google-Smtp-Source: AK7set+Qmg+H5DVGksjKPw0AwrFzwBVOBTnDY5b+saqXAO/8ynNHS9nDddP7dC9o6FbUZrMgcmx51g== X-Received: by 2002:a05:6602:17ce:b0:73a:397b:e311 with SMTP id z14-20020a05660217ce00b0073a397be311mr2559550iox.0.1676494682997; Wed, 15 Feb 2023 12:58:02 -0800 (PST) Received: from x1n.redhat.com (bras-base-aurron9127w-grc-56-70-30-145-63.dsl.bell.ca. [70.30.145.63]) by smtp.gmail.com with ESMTPSA id y74-20020a6bc84d000000b0073fd8ca79c6sm2686264iof.9.2023.02.15.12.58.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 12:58:02 -0800 (PST) From: Peter Xu To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Axel Rasmussen , Andrea Arcangeli , peterx@redhat.com, Andrew Morton , David Hildenbrand , Nadav Amit Subject: [PATCH] mm/uffd: Fix comment in handling pte markers Date: Wed, 15 Feb 2023 15:58:00 -0500 Message-Id: <20230215205800.223549-1-peterx@redhat.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: k9zzr9147xa8axym8dh76mzr4naxrgox X-Rspamd-Queue-Id: AB0DA10000B X-HE-Tag: 1676494687-466325 X-HE-Meta: U2FsdGVkX19JSfiahUQe1HEHDtrUlAbpdrqOwS4BgxvPsJK4abN0EtavPK8FLrA5doin56OovHkCIcXgLm2xBxQv7YEzjSGFHA4dRI7zcoQEjpL1XYufkIALFuWIitDgSTEQZUX9xxfzrh2Sbthunk0PYg36XLE/93crNDxcWGqYn8xecJ3q7e4ikeuXotB5go60qxdYZtNfEzuOxu+xpql7fH0rb0kVV5jUorpIDAZ1uq3yoF21viMe4PKQhbU/DEVhWaUifZWdT0m0hAnLVV2L7jtqv8b2cnh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ilmBwe2I7LbXpaXe3DioF2BVSrxZ5BQBYlC7ImjOMVFDxw7vIbb22L+HQUeCdM2BgIOcP9PuatOtGMjyoBicFxeQV8SUY4giu5fbMWr/Nx3oI 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: The comment is obsolete after f369b07c8614 ("mm/uffd: reset write protection when unregister with wp-mode", 2022-08-20). Remove it. Signed-off-by: Peter Xu Reviewed-by: David Hildenbrand --- mm/memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 7a04a1130ec1..f456f3b5049c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3627,9 +3627,7 @@ static vm_fault_t pte_marker_handle_uffd_wp(struct vm_fault *vmf) { /* * Just in case there're leftover special ptes even after the region - * got unregistered - we can simply clear them. We can also do that - * proactively when e.g. when we do UFFDIO_UNREGISTER upon some uffd-wp - * ranges, but it should be more efficient to be done lazily here. + * got unregistered - we can simply clear them. */ if (unlikely(!userfaultfd_wp(vmf->vma) || vma_is_anonymous(vmf->vma))) return pte_marker_clear(vmf);