From patchwork Fri Dec 13 03:18:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinliang Zheng X-Patchwork-Id: 13906403 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 39E6BE7716A for ; Fri, 13 Dec 2024 03:18:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8766F6B007B; Thu, 12 Dec 2024 22:18:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7FEF26B0088; Thu, 12 Dec 2024 22:18:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 678E56B0089; Thu, 12 Dec 2024 22:18:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 475F76B007B for ; Thu, 12 Dec 2024 22:18:29 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DB3FDA0B21 for ; Fri, 13 Dec 2024 03:18:28 +0000 (UTC) X-FDA: 82888476762.08.3A5B66A Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by imf06.hostedemail.com (Postfix) with ESMTP id 6A791180007 for ; Fri, 13 Dec 2024 03:18:09 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CfgD7CJ2; spf=pass (imf06.hostedemail.com: domain of alexjlzheng@gmail.com designates 209.85.210.177 as permitted sender) smtp.mailfrom=alexjlzheng@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734059880; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=1dxqTMMwD+vdj1yqjgk3Wb4znitd3vyThSqpdf367JA=; b=phY6p79bM0K1ju9d8eI3z/j4RcP9D6nCcF8fse+mQqpy59mrrXRjCeYe02Hq6ewTVnCgqa oPrbxUeMJYmIcMPeFZ/PgS6T0++UpnHm6HbyrlG3DRGd8uczM6mHwDKWvXCVJ/fkCf2qfr DHXpXzpTpm+T12yzSTSgjt6Js07RBpo= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=CfgD7CJ2; spf=pass (imf06.hostedemail.com: domain of alexjlzheng@gmail.com designates 209.85.210.177 as permitted sender) smtp.mailfrom=alexjlzheng@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734059880; a=rsa-sha256; cv=none; b=bJ0HdBN2VhgWvv4zeyILRe7U8/ltDnzGEG+A7DeXEZ4bYPFFSjzqK8wEhPffA+x47Qw8uR FB3HLMrW9eiOHBbvBCxouAyIKcfwtyRh8sDq3bzn1GMyYEc4+6oittH6VxHyJEq+Yfxkqa AqL5ysRZR71BmWWWDWevY0vPu0G8PCw= Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-725abf74334so1090433b3a.3 for ; Thu, 12 Dec 2024 19:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734059906; x=1734664706; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1dxqTMMwD+vdj1yqjgk3Wb4znitd3vyThSqpdf367JA=; b=CfgD7CJ2JlQAT44Ul3joiXi9WQvKsr9JLy7FkeigFZsFZxbynyN6o+ACV1BIPQ9P4l KyGYj3eShoFae9qyPmnXLCuYkQNU4OJ5kewxnmQYfNduBrMgqNczwSuTTSTm6FVWSMpC KH3kYoy6kFd0jpfb83EVZgXFFDuA7unYwNmbbHk22z3zUrp5IOXBphRgkbJ/mulSpLgw rLDfFcp14gpHqKveRt6fXzqWFPqN6qOmO5WoGDAnAao8xmoubO8HRt4h2T5JTSqHcAze oaucQ76asW1nm6x/WfDRlK5iIhBcny5pS+Wgvj7yzLqWGLffjKPo7olNQuEw4dYOFGwq oing== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734059906; x=1734664706; 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=1dxqTMMwD+vdj1yqjgk3Wb4znitd3vyThSqpdf367JA=; b=YMXXo8lImBiMVVuFWMGc+oC04lw3m1rl3AkOLSlW2YbEPhNpraGvY2qX9nO3CrZwGO 0mOz2+4LxYLKlNm35rHpRGT3lLyNy44MjlqRgXrXFDKkFS1Hw8trNR6XoAi+7uyOAksG 01pcwk55CAWhODG4Zciu5w+gfymIJIj+mYcahrQrx9pQ+V4FzE/ovj457F/xLfb/JTQe hkYdhD7jzgbHEovPBzhIxmQNS/ziN7eaHhh5uNfyc0OYD7C2zywipwAW42epGkaRNHfl jZpIAaKq03Okr/Ug2KQCSet7+en/p/kog/7iclj7+p9npNkCtiim72EDv9ILjm1kLe+1 jltQ== X-Gm-Message-State: AOJu0YywjNZJTkLRJzwkwu3fxqnqPsluG2mkfoX9Nysrk8nVTS8tZMQb SVBQ2zQkDhxBcd8j0XmhXGiZ2iIPSWf7stUr/NKLHU6aCGybD4Kz X-Gm-Gg: ASbGncsxBBGmvvjM0yJwTuo04BXJ2GOTtvEQ7DEeDe0nWdNssZP1nKD/oeNZRZV6YAv wHuh/WP0YnG1V9am5gZNPVJVS5JEE0g/hwRSJqPV49clLd/kxCmT4NsQUhmGYlwkl+RbqoQjCdn B/h7XpmvWA440XQspqHgwu9+N3EzFT2Ber6HF1olmhF4/n3n2YP3lb2CtVUtvlhYNxZqDl2G4Q+ 7h3Q7iKjWwMzV4Kk9XWLAE7lByluaAiUY8hupiSBtcXS3Vd/qcxyMPayWzSsX496GyPJ4B7 X-Google-Smtp-Source: AGHT+IFxfLIv/zX/tt9L+6JvNezfXY9Irjpwlt3zALWICnKMq/wRks0+Y0w0LsihnkehsDRjH5tjpw== X-Received: by 2002:a05:6a00:2788:b0:728:e40d:c5fc with SMTP id d2e1a72fcca58-7290c261ca6mr1643285b3a.22.1734059905604; Thu, 12 Dec 2024 19:18:25 -0800 (PST) Received: from localhost.localdomain ([119.28.17.178]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725e7fa00c2sm8603259b3a.156.2024.12.12.19.18.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 19:18:25 -0800 (PST) From: Jinliang Zheng X-Google-Original-From: Jinliang Zheng To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jinliang Zheng Subject: [PATCH] mm: fix outdated incorrect code comments for handle_mm_fault() Date: Fri, 13 Dec 2024 11:18:20 +0800 Message-ID: <20241213031820.778342-1-alexjlzheng@tencent.com> X-Mailer: git-send-email 2.41.1 MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 6A791180007 X-Rspam-User: X-Stat-Signature: sy863htis8osyuc64p4mpfx4hfaeh9rp X-HE-Tag: 1734059889-886628 X-HE-Meta: U2FsdGVkX1+jK+hgMhLC41A+7vnu35NrXJrgxBzVprk50zERj/Fldn/Von4WTuL8Bw5CFrvKzCSstUsTEGrTWMp8x3/o3IFa58kA//AjX1/rwegvt8kebbx8QWH51/jiMl4li8U/8/C6g65aXPHPDEjx/XWbBCyzjtwgkyU72e3xUJZ9yC8UxTGExyNz4uRPkLUcVfM3dz7EE3JWJgmMC8KhUAc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BCSPCMqpphr5EwyK+/1UXnZKtvkJjjzp6zcBLQFXIFbEQKH0SyWR7jkb6sNvpMw823IZVp+oaEDqKgMA7YATkRCmdCGxtrR7E= X-Bogosity: Unsure, tests=bogofilter, spamicity=0.499357, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Signed-off-by: Jinliang Zheng --- mm/memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index d9af83dd86bb..d7342a726845 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -6159,7 +6159,8 @@ static vm_fault_t sanitize_fault_flags(struct vm_area_struct *vma, } /* - * By the time we get here, we already hold the mm semaphore + * By the time we get here, we already hold either the VMA lock or the + * mmap_Lock (FAULT_FLAG_VMA_LOCK tells you which). * * The mmap_lock may have been released depending on flags and our * return value. See filemap_fault() and __folio_lock_or_retry().