Message ID | 20230928171634.2245042-4-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 87D1ACE7AFC for <linux-mm@archiver.kernel.org>; Thu, 28 Sep 2023 17:17:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1FCC08D00C2; Thu, 28 Sep 2023 13:17:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 186468D00C0; Thu, 28 Sep 2023 13:17:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EF6878D00C2; Thu, 28 Sep 2023 13:17:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id DAB688D00C0 for <linux-mm@kvack.org>; Thu, 28 Sep 2023 13:17:11 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A47B5160F06 for <linux-mm@kvack.org>; Thu, 28 Sep 2023 17:17:11 +0000 (UTC) X-FDA: 81286661862.19.71B24AD Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf25.hostedemail.com (Postfix) with ESMTP id 4891EA0002 for <linux-mm@kvack.org>; Thu, 28 Sep 2023 17:17:08 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=vDICG589; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gZNLE8qq; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf25.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@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=1695921428; 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=0puTb4IoAdlhTbyVTv7gdUc1GZTKVZKc1KPHN9TLwGGijSU7diC420pADvT4TcXJgTBmtJ VVO8qxOuG9cHI3l7KZoNlfiqjJMkh69xh0+MrRD7vxr3KggTLbPo1jd5hbszJ0HTare7eT aEZfRwP9egF9vnVL0ApXzpUAZctJqSU= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=vDICG589; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gZNLE8qq; dmarc=pass (policy=none) header.from=oracle.com; spf=pass (imf25.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1695921428; a=rsa-sha256; cv=pass; b=i7q5BAKc+b+LtoaUTDBoG0A/Fj+e5wP6NWNTZAHOoumhuuudXV/B6n/aFsqh9MTaZbD+pI gv4a84BYR4epUSg4dyD/5/9YcUBOmbODBcUMrYzzjj9ofiy8/eAKDrkgiOJoadF2ThBPRS 1flrHOebrFp7XgNtvB7VtKylL/qZdbU= Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38SGipbR029126; Thu, 28 Sep 2023 17:16:51 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=vDICG589HkEcn0XSBzDG7PcsDH8ZR2w1I9VVo0neLcfPFOV0H86oWcK/he1lEj9P99L1 iHiMTs73VCMMVkAR8JN9hmWK85RO+BfxBIQ72KfEj2OX6oLqEO7XfsGyU6oF+SDJvuft BT1VOrMamtbKpjB6vlff/IDBRBMr4bvHhM8DHbD9I2asxhifihVHuwpenRHDbAz2Z6vR s2Jfhr3W7pWociaUjVGc6H9YTM0k7p6NmssogN2WMHW6N7CX3mCMpsaAw6wJxA4BOvpm /R8RP8tNKSC6kThs3X+N7NCQmEnVKzOTh2NvNkKPGcC/bPLWEwnFIh1SQc/zaYzslVjS Gw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3t9rjun2as-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Sep 2023 17:16:51 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 38SH2E0P014372; Thu, 28 Sep 2023 17:16:51 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3t9pfadq9y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 28 Sep 2023 17:16:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VBeAG2UY/T868/5fP6Y8qyllIA/qi8EBURbaOhE94cTCKQNshAYLBjkXs9kDClhR5wDQzuKBbXdJ8W+1c/2QWNRu1yY/aVACeQUcraSI6gliewaS4sHTPSYcJ+MNZC7+9oWUNx1qS48zS99616cJXBuAZoUz38g+s+K6Z5yLfdN+yV6qJaxK4uzNVUBB9kFaWtEkbxbk9THI0JU1yzrLa4ebBY+En9I8teLBntUjMClQaCG411gKC4UTOuQIr/KWz0J2Fzl28dvOi5TzqRLjIK2WoWwWFYp14EClMiUHrE9iTLjT1kFfQ9mR5yB+81tT00sjg9mkibyP/RvZMIde3A== 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=oSNRBP9iHVYg63hPlmRCVXjJQFaPI3aM9UQmLE4EJKDap4U7SB9uHTa901tMPKVM0vgJYt1sZnx+oxGeOzqYL6RqIFniBW3m7zJMatMPVUNSgw+qN5MSDBepF08Aiw3h+mx3pCZnbk5gF3p6xz8fA0WqeU+/oKRdHD/25fn6XzNyr+Bdl+VQ/pUl0mfx0UPPgpX07+YOrBfYADNWGTqm+6a0tP4NFhcrmOt3W9Mzlt4ljXZZrlnb7eb5IKyWywJ/1up7OauAGCSiB6ldRwUBgZ17PvnM9uyhVu1S6+W4MwELocfCIRR3XXTWWqRpU7ncmD9Qg25Kw5xeli5kTIvw1A== 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=gZNLE8qq/wjbfF12q7SoDzZ9BuFCH5/g/OrlXA8KBPJBhSq7VPR7Hi6KUat4Hotm3vWPuKoNY3NZkb47XbyhHd0UtEgKNx7e05buD8QeZRNY8aT1KoHlTlsSM1g0H5etWLOIJaxdt+XEEi4KGbK/akFLJ3jVXrtrfOrsVgihaxw= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by CH0PR10MB5273.namprd10.prod.outlook.com (2603:10b6:610:db::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Thu, 28 Sep 2023 17:16:48 +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; Thu, 28 Sep 2023 17:16:48 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jann Horn <jannh@google.com>, Lorenzo Stoakes <lstoakes@gmail.com>, Vlastimil Babka <vbabka@suse.cz>, Suren Baghdasaryan <surenb@google.com>, Matthew Wilcox <willy@infradead.org>, stable@vger.kernel.org, "Liam R. Howlett" <Liam.Howlett@oracle.com> Subject: [PATCH v2 3/3] mmap: Add clarifying comment to vma_merge() code Date: Thu, 28 Sep 2023 13:16:34 -0400 Message-Id: <20230928171634.2245042-4-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230928171634.2245042-1-Liam.Howlett@oracle.com> References: <20230928171634.2245042-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: YT4P288CA0089.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01:d0::26) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|CH0PR10MB5273:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e1d04d3-ca19-4e6b-f084-08dbc046b2ac X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vIIWUNMO00x1onDjHxGtkiH6QcuN6In0GD8CveMN3E1lpTweRXT4styW1X/BxgJvFL8G0OHIjVw+mbIY3NHf0f0rAV654oKXiWnhlyBQuBxj9qloDful4Odu8oFY9fCa2Le3Trkv0XfQ5KA/FTT9Tu3flkU7j7FCuB0INMA+FCGJm+T+Wzq13HjziltigN5iS0wL/Kp5tzBi0rCznLRixxaSPkscThKNogjwkfEYxenNbyvb9y6F7BklHjLwzQe8xQ+JbQlG1kG7CImuKbvQGdiTKRP8HgdboHEWXmVe92UuXihpn8vqfuMyk7208h+3jED4/m18XLF2lxcYrAW8ZhhkuJHtEgrg4v23UoN8kGnP6HlNwUmwMcSGUl7BvaQ4k3JxcQ2JDibNf8scWyRqlig02hfL52zZJU0+7kE7h08EKAcro+gZ4Iu0cP+9xVODuieZj0HDgLzchKemrw09vlYu7tjYNMndpFWqy7sTQj07lVgSmNXZ3o3nEObyQj7dZkX3hRTXMwU/vXtuBDca8oCrA5Dam9+2UF4qaXZY7EM= 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)(376002)(396003)(366004)(346002)(39860400002)(136003)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(4326008)(5660300002)(107886003)(66556008)(26005)(1076003)(66476007)(8936002)(54906003)(316002)(478600001)(66946007)(2906002)(2616005)(6916009)(966005)(41300700001)(6486002)(6666004)(8676002)(6512007)(7416002)(6506007)(4744005)(36756003)(38100700002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ADAsGMURm9w3fG1K3krse0Y0Nf6Q2DvNa1gg2r/q0CYfjBBb8dKqSXDZL+MnweG9gMzPl/FhWs/hJRsZLQLLJtr4Pt6XulR7Nzrc4JNhXS6H9oQ8URy1DLFb1OpPN7hA4vWrw2bPulf2Jfu9ynI1Rr6OVO1gCFAUJ5YAwCd90a+LYLmBp/WX9ItybcuTKZD50CZIY574kdHoMJX7HYMMworCWHC7QAP2dfQc8VJEFBvbmzBadBGhYnAf6kG92SbRNaQg1H+WmWDuvfVDdVmt7xq7oJLLSLYSH3AUX3Igwvwhy+rGhVrTYwqbolHIsIFPz8bDCRII01z+fNz4xYMIMr4TJ4mOoA88R1fhKZeEgMfcgGG3QmvjiTXoOumAHHhyGCiTlFPXZ0a5wkRcFTYhTnQPbG4DcdPOjFxNZ9itjwnLgLbJrPjRxvYPdDsCl+8nOmm0JK3MAE7q2A40DMIbx+x/fEo6pTh584i6s2JZ+FHbSOe7z/0AgnvBe1uamMhLp8xo61hzIEfZdTs5PSxLUH5D2FRJ6xABOKJNIHkDYysk7vlTcdmOgAGb4zBoRS5NGJOWgn/0bkQ9UDrzBrCLTYj8R1ieejsoQlIyJqvg2LxPjXMTQlCfuKatoXMlZ3kF5g74inqLx/FHPLAORWPOU9Ctk7l+n3TYssMpknit3UwEw3CsHiRrai9aNeoG/CQ0eFmiVNhZ0oaZ5XZ+mCGKWKBhs/YKFjL+Y4NR6V9YhVSsQ/Wc4VB3TB6wWbKDspKWVmelHRgIBG6DRa7XFAfTeTz/tCFIz4cjQIAEaXzt4K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z98/6x5UtK9/7Rw7Wb8NtxsMA7SeggndrXeOtrJp0sd4o/c2ClP1W4iA0aVZ58RQdh57LlQIW3o+21uGeE4rB3vpcvzG1aL+iwaend48be999zJAFco8LzJ355ZKWgIKoiIUiUoZH8PyhoaHXXO64Pf4Riu79djuYBulWU4N4o8tGFy2m9gxW4ZGEJ5HaASxyBC76QgV02w86ieA8o6p/kwmU5EiLiBePzM5tEsrOEa65dKvatG6Tg0Rl7NRK3HSVVWvkUM9yFBNK4jGHAjOSzXExkm/doMrpZwKow1Njw2l9lhIbRyNoiF9Qd+D2YxJor/UkO2V8+ppTdJHaocvhnz/zR+zsK640oVmd0UO/jnE8mRXoK3AiW6TmE3iRwD3Nc73NXjIwsl46HWFASCkYLdIN+OzUiDhq6uBNgJ0bI10vrZm4N4BRrVmU7pCtmyKKrenT29XNWSocJlkLQlDS8sJJdOVo4d0cbm4iBMS4r+vcFyxWZlCepNemQFhSeLDg58S9e1z1iMuT4sbRrJqLxylO5YCXDtfCt/irhnZ5bLlXE/O6aG7NUAZqBH6869111gD4zraX5kM/V48XcPmFY+mb6uwvvNvBVW3x0I7GWShjzfIQKcC2iDs2oo4lNda8MSJlYi08GC58WM4V5TA7V2eFH6QtVke5TM5U50wsToy/1jF4qcCJiTrRCXqVRX3LBYnqIIczBuCAQsXGmYtMt6peeOVUlSIuDyIJfcqTvQ7WSOM/0wNcITs3W0VzmTIhcQ+XRidn6OvQI4/y+qPaZF+AFIM43YCTH8+rgPnCQyTPED X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e1d04d3-ca19-4e6b-f084-08dbc046b2ac X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 17:16:48.1849 (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: Fe3dbssdI5rQS9i5BhIfWMX8xFGm3LdGkuDTu3Rn+kXW+/LN6EVKQtxM+DSJKV3iK/TPQCR8iKhkuHBjgtGmQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5273 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-28_16,2023-09-28_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2309280150 X-Proofpoint-ORIG-GUID: NxYjELUyBFJZBWbmcnHtjFtkJLtbXpCP X-Proofpoint-GUID: NxYjELUyBFJZBWbmcnHtjFtkJLtbXpCP X-Rspamd-Queue-Id: 4891EA0002 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: rb5j8qksj5pb75e8oybzns7youusrqak X-HE-Tag: 1695921428-573661 X-HE-Meta: U2FsdGVkX1+hS1cbqeL632osJL8zqM4eOxCZydrYmCAaTEOlNVjJqg6wu5xuCxDgoMPjXakDkIULgvflHBSJnWWBhbH8UpxHPeBwAEwHwXFTQzjAUo/J1PN+kRxymv9stbABSQEc50YItFH8b1Tf51EdWfruGczjAw/qtEgystzdusWsCxlkIp899n0z5xlGKY0LMV9hqn38ip1cVQSwlxGb8Q9nulTt7tl8QSmt/s0gxhBaHTIp+H43LpM0n6am2NAlZcAOErPU093Jw8QspOuMQqwZ4fNt61LLOX9lRdS44/e3A9i5L1VrCP81sNf4lTSRBFcyLyCxo+U2k9pvaYDklnttcxs+7sJjm+sz603Y5RX3Xhy2Qj9OQFYLhhFl1S3EEGZbV1+IwHgMDq2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KhpWmXTHU4sslCl12EHshUKfCupwsxDxpubHPhmCS2HQfLJQgmZrFAF23XsyhA0urld2 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: <linux-mm.kvack.org> |
Series |
Fixes for vma_merge() error path
|
expand
|
On 9/28/23 19:16, Liam R. Howlett wrote: > 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 <jannh@google.com> > Link: https://lore.kernel.org/linux-mm/CAG48ez3iDwFPR=Ed1BfrNuyUJPMK_=StjxhUsCkL6po1s7bONg@mail.gmail.com/ > Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> > --- > 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); > }
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); }
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 <jannh@google.com> Link: https://lore.kernel.org/linux-mm/CAG48ez3iDwFPR=Ed1BfrNuyUJPMK_=StjxhUsCkL6po1s7bONg@mail.gmail.com/ Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- mm/mmap.c | 5 +++++ 1 file changed, 5 insertions(+)