From patchwork Wed Jul 17 20:06:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liam R. Howlett" X-Patchwork-Id: 13735733 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 D34EEC3DA60 for ; Wed, 17 Jul 2024 20:07:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 55E646B008C; Wed, 17 Jul 2024 16:07:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50E446B0092; Wed, 17 Jul 2024 16:07:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 313A86B0093; Wed, 17 Jul 2024 16:07:33 -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 0EA926B008C for ; Wed, 17 Jul 2024 16:07:33 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id B5982C0C7A for ; Wed, 17 Jul 2024 20:07:32 +0000 (UTC) X-FDA: 82350329544.22.33BA2F1 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf14.hostedemail.com (Postfix) with ESMTP id 567C9100012 for ; Wed, 17 Jul 2024 20:07:28 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=PXMg6VvV; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VOsEjgRS; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721246808; 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=vBrw4cpyDlw0oCxrS1NpsHrvh6il04b/OpjjP2KEzV4=; b=pZpvp9i0tC1wloM2B4+bOiX5KipCy3H6NSD2pGNgaQnHnOfHpQXjxgq5Xs3PB5SizGYPC1 zzEITYgfMz1+ZVPGXsvQNtpJ1dXQaiIRbyWg8sNznymGpI21uUnG/2Ul7qcxcTG3QWHAzh T6sdRhbGbmYR5HxtA1oKVtTiPFL99OQ= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721246808; a=rsa-sha256; cv=pass; b=fBQzuaIJziTgqRPil4gNSpe7fSskwmVEfr4SIGXWptukMs2pZ/YILz5mZMRaLZ2tYmxtQx tbSsu3fjB/bXfTptk+g8yeDmvU8aZiyxbjx3pkfRQcQJxf9aURTJsH0JRDZ/X3BxvkKHWF uubVqOO+bHDks12OnlKpudHqos4bUDU= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=PXMg6VvV; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=VOsEjgRS; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf14.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.165.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46HJu5hB000339; Wed, 17 Jul 2024 20:07:20 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-11-20; bh=vBrw4cpyDlw0oCxrS1NpsHrvh6il04b/OpjjP2KEzV4=; b= PXMg6VvVChm6zPaY5LxlXGuDAk23rLTAEuihIW339N2dcu4knnjE7D4uhSnD6aBY Q3BjC5RuYHrWlTgtd7wwdFBEmKD6eCvbcz0EMDP4OD1oXlxDUkok7EMJ8f9ua6VM DSQdnco0RO3v4klG9W76IPAKvCSIitzkIKqfiDdBkjGMuyzqfdVR7KHTE/HrVJk1 Ot5Lig3trbcwbfCOnbCbVF9HckP6BFYPd+zyCLjnih1KkdoBgYVnBh/t4c3X3RhY U9cFnS2fBVM7QpJCO1bI78EG+vbh8fyGZRNGLgX5dkGJoI9iHrz0rc1rdmiC24OJ Qgw6MLVWh/cnvvnR4cSysQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40emhpr0q4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:20 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46HJ01Pu006829; Wed, 17 Jul 2024 20:07:18 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2168.outbound.protection.outlook.com [104.47.56.168]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40dwey1f7t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=J+8Zpl685VyB6GnOoPaYwgeIVSTMWN9pHHLGHFm/F8+31mK6kZj5rQBPW8iKPvdnWNbMEtTIjhVw9YE/R3Qx4JVAZuQCNHJ4YPWTSdgKQncF4r2stoMlNw3uGUrocs8+PiUAfLbC6+WWpoLSyG93PyI01XwavgoRG4q2CBM3jmyts3J1yOL4DlxTvwf0WdQ0QQ6tmq7CllfzQI7L+83J/O9zhMkC6kjsSS7gfk438EW3FT2lQuH4lpN3nidng07QVlG4V/eEv7avL/Y0RF0rFz8jolgFWAyZ05SKbMM3j5D+1tSIxusRm8Onwkfr/589sNpeLNhJ53a70loaIP3vwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=vBrw4cpyDlw0oCxrS1NpsHrvh6il04b/OpjjP2KEzV4=; b=YnZzkqnsVdpKq0YIYgdiSLBVr0nCXBZ6KHbnlm3OM6ki7K6+RphKkns/B4lfchsqGf8w6NGv92v/PdjODATxSKAFzfZG8bvMVr20kkFH60rPNY1W1yYF1xGJeQp7WdrYfXa5zdygaSbcHBXv1jV2ftKVT6pAT3S09QMLIJLNwZ9SkXTKa8mufhiykJDNH5hsAyjRZbrquqB43WAkeLanTjGl4j1ToVC5XYL7HXCYnci95xkUMUJXHixVGEUhLOxISqCn4/m5hT9xf+sDS3rCocnYhCdcEgnhyaXxfgem1da08MYw1qf1aHf1Y+JaBQ9ZZGrkOzIzAUROC6zPkyzIqg== 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=vBrw4cpyDlw0oCxrS1NpsHrvh6il04b/OpjjP2KEzV4=; b=VOsEjgRSUUQGs3auk+9Zi3ip/V6p43uGOMGR+sUQWJmQv9E0UedlN7DulpJxLzb7bsiEfRSfDLoFzeyb5Ekfycc5y325ykXSwleTMo+Ptb0yo/gN7hAi4GXKEoKtQ8awoVOTCL9NVrmojB7OebO+yhcSg0MMcXnvHiOR4kKJecY= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by IA0PR10MB7303.namprd10.prod.outlook.com (2603:10b6:208:40d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7762.29; Wed, 17 Jul 2024 20:07:15 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%3]) with mapi id 15.20.7784.016; Wed, 17 Jul 2024 20:07:15 +0000 From: "Liam R. Howlett" To: linux-mm@kvack.org, Andrew Morton Cc: Suren Baghdasaryan , Vlastimil Babka , Lorenzo Stoakes , Matthew Wilcox , sidhartha.kumar@oracle.com, "Paul E . McKenney" , Bert Karwatzki , Jiri Olsa , linux-kernel@vger.kernel.org, Kees Cook , Jeff Xu , "Liam R. Howlett" Subject: [PATCH v5 01/21] mm/mmap: Correctly position vma_iterator in __split_vma() Date: Wed, 17 Jul 2024 16:06:49 -0400 Message-ID: <20240717200709.1552558-2-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240717200709.1552558-1-Liam.Howlett@oracle.com> References: <20240717200709.1552558-1-Liam.Howlett@oracle.com> X-ClientProxiedBy: YT4PR01CA0242.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10f::21) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|IA0PR10MB7303:EE_ X-MS-Office365-Filtering-Correlation-Id: 601ed92f-7f4b-4ad4-5dd7-08dca69c0d93 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: Lye1SotZqYbu9AKIX/iRjbsoSp764YIJuWJ8w16eR2Q8I2cWCG6BwcU2CmqeottneQQN/iFU/kOdJIIfeRig65vqtFo7kINJqDC9nmZK5o46DLods/KFrDnHQ8+ah1gokKLm4fAaDHjKfOGjW6FuC9M6i9o4GIFOE5VnI+MIyA1ujV++vkRFtf9oNIiVyxzqM1LcB69AnXVu9TjsfxnksVI8xJDglNRboauzA+Dhbm9R7KroQuHxJc6chXsp57z8ba2RlE+SC+VcLv82Bwrj083MOPGbkGY7H9GIdCy7NVV6QAJDsGsrmWPFFaybh0BrvIsYHDKj+iFhFNBJhn2uxE4C+73djtjkFDH1ivxtOLsE7tQuxouGTEFUytAIJGO/atO4xtY4OFhottxD2dncT84yNYJGZL+y0E8Uw79CxYHhRoQfGUB3Bp7ZODQ+kb6Q90NTQe7mhi8yIixFQDXnVjH66O8R+JlE8RdsGkjK6lzIlxAoijTfxuzUp+IvB2PTK0FSrjJE0ABgX6tywagHMlQrnMVzCLDHWcILZY3b+VYpzcRsjLxnvUps/hwj9jxJXH6mQBgBq5zdp7qWWqeFYgfuX1gS2C0udbNWqU00xlE5S7mGjcGFoxx3+9+mWUGw/xLghOIOWivRd61DsI1jMi/efUjSxEigMZNc4z9ucGF1vnatd0sjtxs/eWKXyFN/zEQyiG0XnYjvDngRJbgwqxPSlRXs4kb3TeOgxZWxgj6gntdg6YFmLitfDtGOotbgDqk9CxIOOSQ+Zb1WBmddUaJg7S2q5yItpQKH0rKquSXqHYnzdAB3QZ1WUT748qTidN53gkyvvyfvHjJYaU6Oh4GRkT8ssvZ5FwfNNQqECEPAyUXkECGI6VJoClnbQP6P+2TxU74n0Hllus/2GAkwRaAqfGt5Z8rQv+5aGEFIl06RxxkopWArXIfgATpkovwKcKntxwLnMchtnBjcXXxhN9H2S8ZG+6T5RnviDkU28EeWY1L40DlFMlC5ZPxyzHJ9ba/i0xsxuXZVVLqDkiaO0wwKFGUVVS6bkSY4aeGFw4zhOHwVABhC6TzKpwbOWAtfgc8guwOCm1OSwlodbbTFjUHxjFkjpueI6eu/C91Kkodt3+ktFaaH6IB43jGXGHvM2gmqGIGPtcNIfq97nvMQJ+U6yQEMhTFQNGumTjpIxQx45/juEgT4mt6hM28fyK6OqWzQt4sW7bEcvf5gm/EDX9GIt1UIIsmC28GL1YP2As6NOT45rTapPy+DxJeWXOaMsJZqGat2gRWjLQcGmbRDrOrkFiZTckMJCaFJ/DarWIKyvVvvSd2hfuO0h0STaH7/zQy4Tmppbr6k3mERpKd2Dw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR10MB7933.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RehTt9hjQSgvOhQHWS0DSfsUzlgd5nVWV87librkiTso+nqo3JpRod6ppw17fS9nD0oKsx5OSziBuzYrMFG4Ptm4228OMWNd/t/NpslupTua00nQNUA1MDmpzn4/obveLwHZGtq/MOM0/Lv9HTtJ5J4JdRxm9AGZ8jZa64oy9Aad7/E7mnY5CsrAfnKexUMRkkPTwXyofJKmONlnR2Hm5hwPjjyzAV1iDVldxtoS57Rnn+8YEdKf0uKwq+jOiqQS8okh3a+s0VrZoYCkI6jGhh5z3Ns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85yUiWMadL+ql+PDODWk82AS7i7q0dGatGJ35CpO4KbTLNRPQdA0KsjSv3lTYOfB+RZJPqsmhzIiX5EIUum6dKQdL5tq++7XS6Hk41CpYPIDzrZVJWfeN1TcZp2y/oKlyzOjKvtwPZwAavLkXwNskJJ4Zt9O4LCkFlzVZaJ/A3qSLjZsF2fTtYOynW4AEbB6Ikh9OuzJxW5RM7xA9JvKOqMcK7wJvyYGUg42OlpWEAQhtzlV0hAjv3HPxSj4ZBJ3divE29V8EcIA== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Vt7qNiN7clzQPgCUlr1B142FzDrMIQodC3KehzzdPbxzh0H31S4takTPTjDbLUeQaQ3H8Ll13aDIUkI8WKq2KYYy/08FFLyYlpQTmFJfaCa2gvnXH459zkiMuE3od/0LIE6J3wisvbT+45UWrKYTkfYREYmaQcxgeChVB8lE7ZyiP6IVxYl5z757kFZ0suuLdlYzw4cUiDbdf0af1xsdPAxQfW3HpnZIY/pst7S/1tuULuBBAiaA+dBqZkBe2Hx0NtfSG16HLntefRnKCr+UKMTp5o6PArIRt2Jf99vOqUJuyKQTDIbLVZsCJM7eW+Nf77pqZI+pxhzv2qtRzeXhumPteOy7J7yhQzNq7JsT3fXTUjMOwkNt02XodU6PwPjwtLgCuWru+kFz3b6PVZecxUBmzDvRz4qfquTlSOnFCZwa+W2FkHbFGa9ev2A4G0Et1c1hGUdvsyw36FdTkcUpaAlnUkT5GzwU0NHWkPQJbEiinvptoLTeiGt46PDXuCOM69l3s3LDBuA6L2YgMb/ZuDifYWyLF3zFCH1ug4q5gBs5Be+KYU2LAe2w0rw60yyIT99B/gdqMH8A/tlLb4tuXz2is89DE5RH/tIIFy9eEOo= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 601ed92f-7f4b-4ad4-5dd7-08dca69c0d93 X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2024 20:07:15.3726 (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: NgtYF8bXCuReoB1TnYjaq900+/AgT9zy1vODnUpRdhgd16IMI73yjxGvM7/Gg0smATC1HFH/8G1xufE2hkmmiQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7303 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-17_15,2024-07-17_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407170152 X-Proofpoint-GUID: 8OI3qzsgwM6PVv8UAj1fSiyPCHzfEas2 X-Proofpoint-ORIG-GUID: 8OI3qzsgwM6PVv8UAj1fSiyPCHzfEas2 X-Stat-Signature: afwfzqpzzxx9de7sfm3dgcdh7b87tyzh X-Rspamd-Queue-Id: 567C9100012 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1721246848-8251 X-HE-Meta: U2FsdGVkX19a1WEQY6uWzVJTcjtsPwnhWEKDDRwa/R4BAd7aGUTPDMJwi6x7nHIYUVPyGv+h5018TKj28uu5rSxvnoESwH6yjhEanLoq7k/2NKo5cD5N46jMqjl1CZ0DSER0aLuouWnBZgWIlBnSNewjO0bQa7uK7eg+du4Rw1HB2nMqV4ec9abNe2wVgpus2gpeU+7rFx6nWLMSwlkME/LOvHIJlVaoSzje3HqPU4vYSw9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rzQDt5dAZSE+AYxmSvQpxUKtyewaNlOh1ECjD+EJCEtEkX5HHM02dHP0EpIMVuXYfaFQpWjf1r5Vk/u4bjbSuixl5U3/63myRqnl0pPtylzTYY/Az6ZFOOYSdhIYJ2ezA6a2dcdrocYMPa90iRHMGqRACNofX3L9lZj9CuAxS7pb7zSUjX7/DCV6/l+Qc7JW0X/Thx85nS2bx5Fs7zAbAibrpQn+mowk5nIxVRjDVhXBu0brSOQP6YerSkf0Mj 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: List-Subscribe: List-Unsubscribe: The vma iterator may be left pointing to the newly created vma. This happens when inserting the new vma at the end of the old vma (!new_below). The incorrect position in the vma iterator is not exposed currently since the vma iterator is repositioned in the munmap path and is not reused in any of the other paths. This has limited impact in the current code, but is required for future changes. Fixes: b2b3b886738f ("mm: don't use __vma_adjust() in __split_vma()") Signed-off-by: Liam R. Howlett Reviewed-by: Suren Baghdasaryan Reviewed-by: Lorenzo Stoakes --- mm/mmap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mm/mmap.c b/mm/mmap.c index e42d89f98071..28a46d9ddde0 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2414,7 +2414,7 @@ static void unmap_region(struct mm_struct *mm, struct ma_state *mas, /* * __split_vma() bypasses sysctl_max_map_count checking. We use this where it * has already been checked or doesn't make sense to fail. - * VMA Iterator will point to the end VMA. + * VMA Iterator will point to the original vma. */ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, unsigned long addr, int new_below) @@ -2483,6 +2483,9 @@ static int __split_vma(struct vma_iterator *vmi, struct vm_area_struct *vma, /* Success. */ if (new_below) vma_next(vmi); + else + vma_prev(vmi); + return 0; out_free_mpol: