From patchwork Wed Sep 27 16:07:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13401331 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 DBF75E82CAF for ; Wed, 27 Sep 2023 16:09:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3AD148D0092; Wed, 27 Sep 2023 12:09:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 35C3F8D0030; Wed, 27 Sep 2023 12:09:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1AE588D0092; Wed, 27 Sep 2023 12:09:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 083A58D0030 for ; Wed, 27 Sep 2023 12:09:23 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C9A4A1CA3FB for ; Wed, 27 Sep 2023 16:09:22 +0000 (UTC) X-FDA: 81282862164.30.0D85FDB Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf09.hostedemail.com (Postfix) with ESMTP id 3F97C140029 for ; Wed, 27 Sep 2023 16:09:19 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=LnrCc9QX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RWL3FX6D; spf=pass (imf09.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1695830959; 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:in-reply-to:references:references:dkim-signature; bh=oqBlX4M5rM78uLOs4RJ0kCjmcY3RQeZAYB9nLkDsL14=; b=1jzCZ3oux+HKfuXJYu+r5OjABZ6sQ6xvBDmW+uU2xQIS6+3Nxbx60yB1do6LXKWMUg+rD0 KRAeNqMvcnaz4san6ha87A89seRKpJy90Uzn/6kMb8Uf2R4ppOt95ZB1KZZ+kQlS7eo1dV 4eN42v2Voo28Kcl993cEu5AKbO6y+EQ= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695830959; a=rsa-sha256; cv=pass; b=rzEWJZrwmNe6fBlyAHjInLblG+km4Yma3tjlteQH47hItvPccTpKXtKG7plV4HA3FcvhEB VU22pzTWaM44JEzOZxg6MSseghKqsOvzAT07C1b6zw/71sc1kMM21vey9DCxnlzL2cmwHK UCmioGvYX9Ug7FE83oD33F7EmWsSAOo= ARC-Authentication-Results: i=2; imf09.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=LnrCc9QX; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=RWL3FX6D; spf=pass (imf09.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38RFtnid011846; Wed, 27 Sep 2023 16:09:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=oqBlX4M5rM78uLOs4RJ0kCjmcY3RQeZAYB9nLkDsL14=; b=LnrCc9QXS6HNkCO0qdfM8Q9/NuHLfGfT8DXxD6rSweX4uX+IjhoeiojDNghNduZTxfqJ hmdUYsj0By6AH7zLW9owcrNA6A5t0HR2uiU3LhqNfBv6OQX4st3wJh8+1sVpvMJ5atqn Uo0ffJAYkyDoUZPg0rJxuWZTm3rJKnPxtlnNDSELQV+wLRiFTPFWj4OGqn1jhaSX2RXG W30c6RlTdPoHHu2a9CdC2TE33N8lk8Ap5rI6K4OOM695v/ahE/wNualLfHEO/UCqMy7O JS85O/cr1LjnAOas2okQPpiD0si84nQql4/Pfv6FlN+kxyTklnhxkksjbintwKwr//vv QQ== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t9r2dj2xa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Sep 2023 16:09:14 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38RF07mI003188; Wed, 27 Sep 2023 16:09:13 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3t9pf8fds4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 27 Sep 2023 16:09:12 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fFvCqk8bRpYYsWWrgmn6I/bq6idcZcEdWaQHXanjzLY6OsXGi191y0lFLX9z0tOUzxQCpPM0ndhgDxDEmXhS/0pmS25dw0ByAl/lSzW7xcp5H90GqKyMCVSPvbsvUYa0OpU6WZMXbJlsc7ek+VVXyFAm+LKoEMPc+HbXYBKjt5woxDCC2ZUGfTRscIY6uyQTlzrWCxDtCUAYSPtoONgMY7q83UmkMCuBuZ1z8/v3CMP2Yk3x2HaCOShFd7lpsxWmXuJrZSXoe4RRVPUZG8x/KFLLRcVbUT1ZOz2G+XQd9RKW2ysMwRIrD64fJL8T98wDg4a3KupFYJafZ5EZzzF4/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oqBlX4M5rM78uLOs4RJ0kCjmcY3RQeZAYB9nLkDsL14=; b=MNE70n33LsJ0hS4/lcFg4HG8kAocjxoAkdMcT3e0A4s4orU6vzftRZTuBYsGzY5PUu+7Vrw7JQVKtgOSwjejwP+li7x7H2ECwfZkDrv3XI4b1/STLVv+Fq/VBfyHavuHyV2+RH9rqDq7zLyrnsqNqrJE2Y+oZMGf6cG2jofJn123TdCszCApK8lG/iPHhQTxZ0cIjGSwDqrlQQua2qFyHI/Cae8hZ70/LWL8wVSJpxP6pQgUN8UPz94T3cyDDw2g0v9ALibe2K2T7Qe0XqHYyGPctFvPjpbe9P2rrovTpAj7HDZ2F7+/GvG//16dZ8Cd4S71Ph2ccgHPuYoOiCXBnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oqBlX4M5rM78uLOs4RJ0kCjmcY3RQeZAYB9nLkDsL14=; b=RWL3FX6D2GulVbl90FBSxrDxcK4odSlU1hMNTuEMjnhBdzONgUZmaS/7WEFVlFtk0xrNrq8egpaJejBfiAp06K5kNC0UHg/Ar5Xs+wpV6xMsLFPZPW87Wu0rfm5DaCeWdd4nd3W0e69UYEMYfO07AjudSFX71BhJcr3jMZ727RU= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by IA1PR10MB6122.namprd10.prod.outlook.com (2603:10b6:208:3aa::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Wed, 27 Sep 2023 16:09:10 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::8979:3e3f:c3e0:8dfa%4]) with mapi id 15.20.6813.027; Wed, 27 Sep 2023 16:09:10 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jann Horn , Lorenzo Stoakes , Vlastimil Babka , Suren Baghdasaryan , Matthew Wilcox , "Liam R. Howlett" Subject: [PATCH 3/3] mmap: Add clarifying comment to vma_merge() code Date: Wed, 27 Sep 2023 12:07:46 -0400 Message-Id: <20230927160746.1928098-4-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230927160746.1928098-1-Liam.Howlett@oracle.com> References: <20230927160746.1928098-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0467.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:d6::23) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|IA1PR10MB6122:EE_ X-MS-Office365-Filtering-Correlation-Id: 5907b717-65c9-4527-0bc2-08dbbf7415bb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GzqrwfoIxVMHmuax0JIhDby6Udm3jXlVqAHxhoVkaWmxivXx/gN5DsNYlkfg7KHv2O5wS1zWRpSWnliL9Zt0zrcHTJqLUu4SSvyFyFMDgoLz05W8Oq/06Z6JNhXL3olGFVWdDOzHEC2kdvN4fHlUnFVgVfGxuDadflPCN3FR5K3BboPq25GhFpdosHVrfnH1Czbt0rG9eTTO+fMTZKy2B5tx9fdu7G++DSJm0uDTPf5JYNBBN/i/w/pHnh+p5fA04+pTKf4t4CHeYHkM61L6XQtYY4DL71AW+rCodmYh4E7KH0T5OlkgR15za2d4LpCohgcIo0XBKgeYoElmW+ipk2nmxxMUWUBnrYbML2IlVxkD1eAZ/3by/zQ28PsPAzSQq2WaqrJn1zzXOn4dnqYAlunTdKR0DlINUKtorDg0gCRTKzlliGBfFflel+YFQp0tYGCEicjLUAgz1bLEDU4u0ypQRvmSTlJvMelMn+2xUCXA/Q4w8TNypYQPjnbvGd8BoJo8QDjlLkYV3Ce9j5ailAhwvzEAxmyPhEop5nd437o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR10MB3022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(136003)(376002)(39860400002)(366004)(396003)(230922051799003)(1800799009)(451199024)(186009)(66946007)(66556008)(66476007)(38100700002)(6916009)(54906003)(478600001)(86362001)(2906002)(316002)(6666004)(36756003)(4744005)(5660300002)(8936002)(4326008)(26005)(966005)(2616005)(8676002)(1076003)(107886003)(41300700001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Gsf/4GESs94eN5lCIgKxkS7vAHaHqQtBe5H4Xh2a9ErBug+l3O4M+FzsnsnFhaD1N7iIrIdjo1hQFmYPv9Bu2kWmUQbwRqwak8mYeQnVHYmbKCsx0i7laLCwmL9N1UHAyUWwordUlVFJMiF9s3yYpdrU2TvPAUdGJLrFyivLycCdJlIMXTrv6kLoi5CbpVqWCtqhLomNIpsT33kzmX0N+QpD4QaHn4j3i/AaP8RzyVV630xhfF5noKHwOdqLuBPNm/kf1L2QhFaKM55p4kaINMA0yjBnSqDPJgCUkOEijejMORCLu8rshefTA6a/sIRZt9c03cZhaTYtM9hkhoPfYViokME3a2AThfZPSY0Kp6cUa/uQ+QY9IOvifbIYzyKBkKxOZz7ORx683c0KVaoiApNxQpl67WhqDa6yFcgakBsGbnJSEKZSawfz0LhXw3NgXh3Ko/kvMMB8Llvp0GQm9oRpMYkvGympfW/pdWaXKPQ7tphOymNjinq/97F71lSU21a8B66vlCDtFpIlaJ8Mb0NvfExxRb9OcvW+UZbqc59PFznxQ3v/u6kpCli2ZtB9M+L93yzM9GYNPOQbRWFfVl3Lr1+DK75vISWB35JwjkggsUIvjKF9wkvJchKnc0Rtv X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5907b717-65c9-4527-0bc2-08dbbf7415bb X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2023 16:09:10.5455 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kHSykIWf3rT2jFGjGW6Gj69G+1FIZAmXDhD6K9lRWil99ZA2nUMrjkCHb1qA27nKVpReAPhB2qs0pN/RVVKhvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB6122 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-09-27_10,2023-09-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309270137 X-Proofpoint-GUID: 0xVaS_hhujfNjjALrxXp5q4OSLjiHGe7 X-Proofpoint-ORIG-GUID: 0xVaS_hhujfNjjALrxXp5q4OSLjiHGe7 X-Rspamd-Queue-Id: 3F97C140029 X-Rspam-User: X-Stat-Signature: ge1ee4ckg85dbyc4nbsdgy6xhxgairbm X-Rspamd-Server: rspam03 X-HE-Tag: 1695830959-177698 X-HE-Meta: U2FsdGVkX1/Pv6785aB3s8+q0ePBjdTE8BzG5KKBnVgtYcbmud8NbvcTo5kz3T7242/1lF3ANTnpLKwKxkcDbtxznCS7OR0oYgbeEutdCHHHaCC9XRq7fAXOjnmSbo8W7pklPa6AY9fXF/n2n7FH308s3jFUIgz/qZD1GnrBTyJgv5/y/04QQC5MJWryClUpOMaDAT3MLLZaC/kN9JfvgEhksbJZBbHty39qZiNWMEaataPumX1BotuDIFePtv/UFRwITIJKbh/zAtm2SzF+mF9hZNrRDrsVeATjphl+bY9OOzP1EykNYtIxOzFqQHI/UHz+EFVJGY+jCMJhBB/bOBp6wmVCEnm3+KktUZhLex/sr2CW+sbVC29OBbBFRw60Ru7EGWJ+TM0cW1KEI+dGT0JUJM1XH9jtFS6M6/Dy1mWHauTjOyIhQ90cD/8h5k3GRqtJZDGgqdsDWleFAZv9VwF7wWS0mZKpkiuQmER4BZ7bz7oTVZJWL3PboJoPRBYASkSafio1rES+bghj4tu3FJLdEbC6XNLqOumH4cb4mXvnOD7qKRlEEQoSwSwtjoX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ner-majordomo@kvack.org List-ID: When tracing through the code in vma_merge(), it was not completely clear why the error return to a dup_anon_vma() call would not overwrite a previous attempt to the same function. This commit adds a comment specifying why it is safe. Suggested-by: Jann Horn Link: https://lore.kernel.org/linux-mm/CAG48ez3iDwFPR=Ed1BfrNuyUJPMK_=StjxhUsCkL6po1s7bONg@mail.gmail.com/ Signed-off-by: Liam R. Howlett --- mm/mmap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mm/mmap.c b/mm/mmap.c index 2f0ee489db8a..3c78afb707cf 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -937,6 +937,11 @@ struct vm_area_struct *vma_merge(struct vma_iterator *vmi, struct mm_struct *mm, vma_start_write(curr); remove = curr; remove2 = next; + /* + * Note that the dup_anon_vma below cannot overwrite err + * since the first caller would do nothing unless next + * has an anon_vma. + */ if (!next->anon_vma) err = dup_anon_vma(prev, curr, &anon_dup); }