Message ID | 20230928171634.2245042-4-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp3591789vqu; Thu, 28 Sep 2023 13:52:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbgE4LdlXyGENPfO/66bU101pChE3f4/sJJ3WtspxZJXptXjNHe2iGgdngV8wZwQAcfHmr X-Received: by 2002:a17:90a:2a48:b0:268:3d4:24bb with SMTP id d8-20020a17090a2a4800b0026803d424bbmr2251782pjg.1.1695934363319; Thu, 28 Sep 2023 13:52:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695934363; cv=pass; d=google.com; s=arc-20160816; b=t2DcNmRuaAbbGNztgT1VaXa2bXkmanCX/Py3qr89cB6nYfi5t6nVAjEzmf9zB78KMM BLZr/jZmrs7JS7P7kT1UVcpku7mvUlpqDfQwLB3+18hwuucuoeCHZ+pW3tdjW0Ir6jwS RCf/pQTbV9qgohKKxelqnOMZ/aghTmsa3giQAfML+RfI5Bn5i8UBiYntXaoo6iMQf0+4 w6nARBptQWjCEzf0hLWXffPyA+cBxFTIfckneNKHIu2MURZScTn3l2yYJorhnAaoiiFj 4uEx7K7QRVwr4mvAYCWJaVvXoQn8Ra4VEkn2k90sFwUh3uPEr940n/b1eEbAbeUN+hAJ drWQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-signature; bh=oqBlX4M5rM78uLOs4RJ0kCjmcY3RQeZAYB9nLkDsL14=; fh=hPnCtjifB7djCYOsUl6E8225/Hr0m+dX2ogF3Mg9ZkA=; b=MIZ4jAtzDdr/SvXuK/rJ9NSfOeVu3WouvPUbPCY/lM/wBlIl6dW5T+9v7eYoZH55yx U/x936m+CHwcj4yGB29kyOtD5hRV4W9eA+6TG3f1A8KJp0uDOwSizGxZzGAXwkfN19eN puo4Ed3z0SGcd8iGAu80wEPLxnvIPATMWiW7zpB7g0x26tIX7wk3xYG/7Mdct8pJI5It 0+ZqQg/tVqKyW/IyaRXjx3eMViSZK9p9oMcN57f6u0c5tfAWvzTBc+7EpL5Omul3n/+S qSAo+2xbFRRG1CNlV+JdN8AWCqsyfOobJVZsBlpLvjqBvWu6M5csLQjfv6HQB9KdHIUz JtGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=vDICG589; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gZNLE8qq; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id g23-20020a17090adb1700b0026f75d932a8si18430426pjv.185.2023.09.28.13.52.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 13:52:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=vDICG589; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=gZNLE8qq; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id EF36A82E7513; Thu, 28 Sep 2023 10:17:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbjI1RRZ (ORCPT <rfc822;pwkd43@gmail.com> + 21 others); Thu, 28 Sep 2023 13:17:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbjI1RRY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 28 Sep 2023 13:17:24 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FC201BC; Thu, 28 Sep 2023 10:17:19 -0700 (PDT) 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/hJRsZLQLLJtr4Pt6XulR7Nzrc4JNhXS6H9oQ8URy1DLFb1OpPN7hA4vWrw2bPulf2Jfu9ynI1Rr6OVO1gC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UiDhq6uBNgJ0bI10vrZm4N4BRrVmU7pCtmyKKrenT29XNWSocJlkLQlDS8sJJdOVo4d0cbm4iBMS4r+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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 28 Sep 2023 10:17:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778316071160372528 X-GMAIL-MSGID: 1778316071160372528 |
Series |
Fixes for vma_merge() error path
|
|
Commit Message
Liam R. Howlett
Sept. 28, 2023, 5:16 p.m. UTC
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(+)
Comments
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); }