Message ID | 20230110183042.1265916-1-Liam.Howlett@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2907387wrt; Tue, 10 Jan 2023 10:36:55 -0800 (PST) X-Google-Smtp-Source: AMrXdXvpjmk9dL1nWtJZDiuKQaLWhCGWROo4Yxz7ilvgN3Nh2SdKcMmov16NCUophTtNy3lUEO7i X-Received: by 2002:a05:6402:2482:b0:47a:e008:8662 with SMTP id q2-20020a056402248200b0047ae0088662mr67108583eda.34.1673375815108; Tue, 10 Jan 2023 10:36:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673375815; cv=pass; d=google.com; s=arc-20160816; b=N9f0MWZiNIKMHVjGHZdpURrX+JxGsFxOC2dfCr4Mw30T0Bk8g5RN/21dbu/h7VmOHY 2wmN4JnAmN8b1XEE7iUORzCOuMYScGZsFUxtcDcggJsH08cr0gud4n7bvpbeivdA5ehV 6IHKPRd/1e4N1C7qAvjQMtr0qtg9tZfW0cMDvRt50LdRSxd3uvIjERGMRcaYh3whLj99 ujwPJ4ZllySptxPppdQpgvkZ/3/sm36Sqg+phe8ji3u9p7Qeir+U6zL9b4biFVLoQTPy TZk8ql34hEJenmX+K7ryb42FHAmDB0ydYux76jx3Q1ouQ7QZL5k7TF3KLRdQxcpcXkAh Zv9A== 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 :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature:dkim-signature; bh=P1zsPi5LS1TxtLS98/bIJ43a1f25CNwu5blWhcNQduk=; b=iGvbOkie4mVGaB7s6iCh9uuV/xCP/KkTc8hpwwqt4QSLfgb7W8ViJxr6xsux2UxLJo OaneXLOwji4T4q5mCkW//AEABxcqGOrPJwRuj+koB0JrtcG84Lf/+mpdKSr4wtgKYLJP j60zBwBdLvhQNoBhQwB0NW/1Bk0in3dGPs5Pl9d0WQBtEAxrjk0f+QZ+GLS3hPzRlAmR MBSqkHfJ2tV1clP6pG8OxiNBhpeDQy6b1X8JX1IosV9mt5vdOIjEW4imugc7eGjDz3Sz lAYKflk6PmX/O2DInVbVlENUdag9L02tnloVaHUabuvIYkEaqsCM1KxbYL/l6aTaCnQV 0DNg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=ItfO7dVQ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=A8TZdObp; 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 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056402358a00b0048ba605a150si14648835edc.240.2023.01.10.10.36.31; Tue, 10 Jan 2023 10:36:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2022-7-12 header.b=ItfO7dVQ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=A8TZdObp; 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 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239316AbjAJSgC (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Tue, 10 Jan 2023 13:36:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235038AbjAJSfY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 10 Jan 2023 13:35:24 -0500 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5343D17428; Tue, 10 Jan 2023 10:31:00 -0800 (PST) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30AIEEtd023564; Tue, 10 Jan 2023 18:30:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=P1zsPi5LS1TxtLS98/bIJ43a1f25CNwu5blWhcNQduk=; b=ItfO7dVQvcDHyzJmU2AN3rwd2k8Wr3SqfXB0i0GZa46hXHac9bpcIGA6IMBkNbwC92b2 dj1jkPkHHAt9xD5hV8TBHVQr5wmeqFnVJRuxLG04ZDqmC6jKzi75zPNhNXhGtGtuXNAd 5D+wNBO0clWcPGRKDF7jCIuKhDBwwRktqN3vJCRKt05NX8lozvZx2i097mcXSRg9VIHS uZ/GU+AiCHyXyc2CtjAuAwK0ZAQ4paIR05qhh9RUTyCCcZsDVI4R50T2QPNAY3toSuA/ 07qwjtTenzjeW6Skepq3VL6UqUHvwlQkNALL+l+6/7xDAhC8CLBz/yYM95jZDHvWZzqa Yg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3n1au1ggue-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jan 2023 18:30:53 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 30AHrw6o039043; Tue, 10 Jan 2023 18:30:52 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2100.outbound.protection.outlook.com [104.47.55.100]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3n1ctv1q6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 10 Jan 2023 18:30:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EYzoLNahSXw2qlVG3WNTffBX4SykS44KfrHxJfp2DiG6zVm7/qvcWO9cfjha5AUZhtF2Twph8mD9cXSlYDcJ7GYTEYDEedA/wBe0vatfmXx2ldFWe5mgKSjGJPUZcvuan3EigFJ3tV3jIxqyxATom1RGP8B5BQfE6hrQuveUx+OeP7Yjc5A0Du/LjPGQc1pbb8tZZLYrcRxz3h6dNWn7w83HArdwYA0nUn7RC8M9nrZlpGg9EfkVhixQv6TOn2L0ruBzyjmoG9Axiy7LyAidkHQZhSiGeNH4g8mxvYX+rko5lBUFnQzBn1D39HIumEOMJ9RXa1KWOAobpokWqXd9lQ== 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=P1zsPi5LS1TxtLS98/bIJ43a1f25CNwu5blWhcNQduk=; b=HSm/rDM0uHfmyGKTvjapkNUsazX/dXACazAFI+oHynDZ9c7Yabvkp/xofG2FA+LaBtW2Tc4t9uUjlaWUxG1ve0j7kMztjhqrqOdCRh61no3a6CA9Wv6SmnJyp5RrOdDTCb0uZl0ZAU+G5wqM6usqs3LpYz/bMa83FEvJQ6g+mytJ8AZ56WDvpvvtpP8j76ZbAtgdLTFaAm5VwjTc2+j/8JC76PhQO1dUOLQRxY+BcRPdHHM6SCDpmBRi8PWV+KyXyOzRXCM8et1rPYfvZQxBfGowGORrD/XQeDWF1SCbqjw9vXAc96dVruYwNxgg2qH82RS8gYFULeT+SwoTvZnvWg== 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=P1zsPi5LS1TxtLS98/bIJ43a1f25CNwu5blWhcNQduk=; b=A8TZdObpeHbkklWqN//kOpiMwsD/hWzUeI5A5aGhwYqbz7sqw1UGzl+NsyBTTE16Vi31vziGlpL8z6aPpJEKs5fXn//iNdgjUwec2aMQlIOUA9qj9HbSub/uv0mitqG46SEeMY7nW/rjv+evQ75tBne3BZlVTk4mgBEI4qOzF2M= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by PH7PR10MB6987.namprd10.prod.outlook.com (2603:10b6:510:27b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.10; Tue, 10 Jan 2023 18:30:49 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::a02:2ac8:ee3e:682%4]) with mapi id 15.20.6002.012; Tue, 10 Jan 2023 18:30:49 +0000 From: Liam Howlett <liam.howlett@oracle.com> To: "linux-mm@kvack.org" <linux-mm@kvack.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Andrew Morton <akpm@linux-foundation.org>, "maple-tree@lists.infradead.org" <maple-tree@lists.infradead.org> CC: Liam Howlett <liam.howlett@oracle.com>, "stable@vger.kernel.org" <stable@vger.kernel.org> Subject: [PATCH v2] nommu: Fix do_munmap() error path Thread-Topic: [PATCH v2] nommu: Fix do_munmap() error path Thread-Index: AQHZJSGpDMc2b88uFE21NhGfPY60Wg== Date: Tue, 10 Jan 2023 18:30:49 +0000 Message-ID: <20230110183042.1265916-1-Liam.Howlett@oracle.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.35.1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SN6PR10MB3022:EE_|PH7PR10MB6987:EE_ x-ms-office365-filtering-correlation-id: bb8a4b6c-022b-4b6e-db3b-08daf338cc53 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GEo/WnolRkKvA7SBIuyMDdSbV3VTZPHn6OZsOqsbBe2zyfOh5reDp4I6+fvSs70V3B/T5Zhf6GewM108Jspnf7UYFgf6xnl7FD9Cl5JPcaEzbsazquOnDH4NW7pPzlat/EDhvnaX21h6N4pvYlu19AgZ4BSJYkstcAlJ8TTLKgkSUCgaCIFG1YIRrxmE2fZxW+UgfAgiNiNpvkFSMzaosaSsQ6XnDiWi2FAeAMpaDZ1jQT+3DhZZQEpVNIb0NYthYu9usbS2K40Ba+7CsrjLj/lfYqlcuRU012legr4l9IZtLY9Yx7Xxq+uQVDQwgzL4BAphYQ27Lj4uBDF+miv13tVhSHf68/2k7oeAq7qXLmT/Irm9VnTzMN9e9wbgpffLKfKKjoAMRxvuCzy+7cbkE7GrDEWofEAAZIZOKePVw41ccO604TG7xeyoZiXjuoaqJQI6Ll4Z9WMVnjgdVrdGCjVlQfeD1RbpC8pw16bhlrSzBzBMfZT9jO4hmgcTO1//0eRXyi9vsK5T5C+Jli47cU2bjwyjzgUYRJ3g51iwJqVnN0wo2YnaxQiUkUoTSDVx3QZIt+5VEhO7NiG0qlHeGLWZUuW0n+HwRM6o+AbJyLxjCA/euimWuUPo9iI7isfh/u1payuINhUy42SZX03jIbOwm9/9zUsb3iqhx2T1Ewuxi7IEemGNuwi6O8MhdxYtCWtubOSmyO0SqR+t6qR5+Q== 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:(13230022)(366004)(346002)(396003)(39860400002)(136003)(376002)(451199015)(41300700001)(38100700002)(38070700005)(122000001)(8676002)(4326008)(2906002)(4744005)(44832011)(36756003)(5660300002)(8936002)(83380400001)(26005)(186003)(71200400001)(64756008)(6512007)(6506007)(478600001)(6486002)(54906003)(110136005)(316002)(1076003)(2616005)(86362001)(76116006)(66946007)(91956017)(66556008)(66446008)(66476007);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?rxwrYDI3wA2MGIGJWClOHxz?= =?iso-8859-1?q?dyYDPp63M0lWHRdXUSP9oCPu/ou2w3A/Gw0G8JdsgaEcLxphn64aP5BifmPD?= =?iso-8859-1?q?l5ldatZuBPs95hE4zuod/tswpZNqPG87IjDz85nLVG/dBuwcKYkaLqXw3PmZ?= =?iso-8859-1?q?UEEn4jhOd/tPNkDnwSEfZs7Eym0Mnyx0ACvFO8KkXoSLkisQtQBNyYvgQWfw?= =?iso-8859-1?q?Hu2JSJlrUVbC2TK6TfoOa0DF+Zk5JkJsg2JBe9UGWPsNWlALr7Yf9O+pIuM0?= =?iso-8859-1?q?Gp9qJRpqy4zHe2N6MwABocyUpkE7wW3jI/+CyjAhSnLwn7UO3bVr9r8QYxeJ?= =?iso-8859-1?q?RG1lSJGnScpq3oKXX3PjwNiDVUnBpr+X230G9Enip/3k02nPZ2Nh8y9cHP7q?= =?iso-8859-1?q?jqEsxGoJF8uuLPQVO/3mzuIBkvisD0w7n0+8PqQ9GAsN9vK6yMB76a291sJU?= =?iso-8859-1?q?rk4pbJ1OwFkqDsCMZHepcJhp2cu+F0HrxAXSM67/Uc6/K0ARcAei7T2FAsPq?= =?iso-8859-1?q?J/7WzgXGsncwPr0AEAyrswq2k12wbuHJyK82rLikjwA2q+HQuR7hSH67FY5N?= =?iso-8859-1?q?GytKW8G22AatvkWj6Yov8P3xZRiu/TeLkGjEg8vCzkekb9dnuBM0A5wkVNFX?= =?iso-8859-1?q?nwcKt5lpC5WRyc5qJu3KUakkXxzk2z61yMhihCG4DTGG0xP2D3Zku0k2M6Lt?= =?iso-8859-1?q?d/9Z2XF3/VlH+YCcAzLew4zIlxKl9eaibBo1Ju0YonahGskpxbqjyv7+//JQ?= =?iso-8859-1?q?9F7euSBDp/3BDJh27UvHN2XmUdZ90qjsk5WssK49wPMkp714PN6jrlbzlT/Z?= =?iso-8859-1?q?PNFvnCBYOwS7Wh47CvW1FZ0gNC4/UfKVrZGVkNtMUmO1W+SroflnKlGglOpL?= =?iso-8859-1?q?gmtTZ4srlyrGOCHhlWx1sANKgI3tcdl/UjYlbZ+ByhPso1yO6jDY5U+mB6He?= =?iso-8859-1?q?/v0hoKWILCeI4C7Fn+bbYzM6eRVBqBnqEvEwldY/5iA9js5NyYcve0vciH53?= =?iso-8859-1?q?LXYeDawIkbDYt1vd8kli7GeiznvV3aAV7NsRwP/lrcA5Ch/YLTVSORQ6/vqv?= =?iso-8859-1?q?7DRRgGh62xcmQavXc9fMltNreOW7DM6duh20SuNN7QFEGn5vievoVuxmGKE7?= =?iso-8859-1?q?bpi94O54xYkvaoStocjf8RhaWzcUexHzU0B59QaroPsWSaDpCS16GoQ69oen?= =?iso-8859-1?q?XlJatRnI066FxF4sH3wRbGSRjRhgbadoGH6SEDF26AaGkmByg8+FYBradHAe?= =?iso-8859-1?q?/V4F4AGZjnxxDKNtz7SvdFPMBl/fqKTdwBbiypdUOURIg78t/XZYYnlD3KRw?= =?iso-8859-1?q?Mw/N+UDdBJVR2JCrPIICDHtNpiKv8O3M2wuGv9jKXnJOjfKJev9bnPr1fgQs?= =?iso-8859-1?q?rYCnHYYAPFz7gAV88OQzNIWnOJm9ka+WSwEqN0KVqqMR9Yo3hIA1EwaLe2jK?= =?iso-8859-1?q?tw6b3LuG0xRk6Egs++3V+b0PxmPETnplMMaHWvriZhJ7JuwczvhFVsSY0+ns?= =?iso-8859-1?q?VhO9J4V6XKN00PlyLafjoNn0VNbdvi/S8eWlqk1Id7GWxNhP3QlsEwsNooDR?= =?iso-8859-1?q?in9I4J+fiDWNBXn3IGoaI+qvjFrxu5d8XXfA1la1ZBxqF2cVyBfafK0kyuPR?= =?iso-8859-1?q?kSFMKRpzTvmmVvMa5MltPvX3GmORDWHfTcNjdcA=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: rHQ2OdnurtZKBIfd4WSlhZFjfHPKWGgrofoVOPPoL8MrVEDiW9Ry/AyT4/fLG8NSo/fby64mUewgnhGKML5Tea8bnC2CGmfNFuCEUGUl6iwKiDSZiVL3F3aUlV8dGZlkFi4DChcNw6c5og5goCmWpYlQdKRrgOOchsW3HFEgglouSh/JpY9dUtsp3d6R23yP6dYsVUqAV8p/bhMq4dWljY2XD6pvD3KVoJOLoHAIZAAb1ctinzHU6ol78E/mqH7+PIN85Tv9Q6Rul5KuXD4H5pPgaZR1pYUCbxJHQfI8CR5OYX9WtZ+nu5QmlomhHp1nobDJKID0oqowyvVnUzvuQOEhwFZKbuEsScbcG7T5rtFvNaSN/ypc7GVZ6RiWEirjOaTMPHD9b407+OkceJk6TK59d/axKgFrN0KgTWm8S5JIU6a2ZrRCY6qfms+hwJOH9kSdW2GvRZ0ULYSfw8MqPUnLCb0eOYaDwlZgnWlyruOz+4A01eOTb7n/LundeMiOEclcGnMZrT+nnigqWEGTrc9t9yqLdVsPTJg/rSxAY5k39VEVx9+DX17QGj9PZ/Lh5vc5Esj2pEAlUkxNc+9eKcCo62Mnr+gTlafTuKNeTUSCdxVzbffN8nXuMoEQifgJdxK4vuJPpX82X7H59gPnNih2NaL8ru1CN28BknOwqeZJXVgfikWq6KVeXKnDvX+G0s6ceo2a2DqD2cfTg6jIR7roKbpomR41mRy0pv+bRuo4Q/OAZTzqxNXgqqtrUD5Pyc9/4cuDkpvJEiqCvccdcelbXhhh5pvgIerD+NzE9VRw2H42MKcZUcMzNWghfF+cKtnP+r/FutwnjfUnjJnS5K36RiKUWq2wp5mpBlLjdgk8c3+kZbO8z7Qy2ly2cn624T9ekErzdJo556jpxiF7VQ== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bb8a4b6c-022b-4b6e-db3b-08daf338cc53 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Jan 2023 18:30:49.7643 (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: RQ+NaSSwKEhBYzjE917q9CrQLurlah5+mcYvlsw48NwNx4lxi+46Gc02jkL9L5a8WvrrI0DNwOTRZbzqsUugig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6987 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-10_07,2023-01-10_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxlogscore=999 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301100119 X-Proofpoint-ORIG-GUID: VOMH4siUafVhbDzpitgynhptpDmH7Jeo X-Proofpoint-GUID: VOMH4siUafVhbDzpitgynhptpDmH7Jeo X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754661718491388920?= X-GMAIL-MSGID: =?utf-8?q?1754661718491388920?= |
Series |
[v2] nommu: Fix do_munmap() error path
|
|
Commit Message
Liam R. Howlett
Jan. 10, 2023, 6:30 p.m. UTC
When removing a VMA from the tree fails due to no memory, do not free
the VMA since a reference still exists.
Cc: stable@vger.kernel.org
Fixes: 8220543df148 ("nommu: remove uses of VMA linked list")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
---
Changes since v1:
- Added 'Cc: stable@vger.kernel.org' to commit message
mm/nommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mm/nommu.c b/mm/nommu.c index c8252f01d5db..844af5be7640 100644 --- a/mm/nommu.c +++ b/mm/nommu.c @@ -1509,7 +1509,8 @@ int do_munmap(struct mm_struct *mm, unsigned long start, size_t len, struct list erase_whole_vma: if (delete_vma_from_mm(vma)) ret = -ENOMEM; - delete_vma(mm, vma); + else + delete_vma(mm, vma); return ret; }