From patchwork Wed Jul 17 20:07:07 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: 13735750 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 3733DC3DA5D for ; Wed, 17 Jul 2024 20:08:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 032F56B00AE; Wed, 17 Jul 2024 16:08:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F23016B00B0; Wed, 17 Jul 2024 16:08:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFEAA6B00AF; Wed, 17 Jul 2024 16:08:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id AA5B86B00AD for ; Wed, 17 Jul 2024 16:08:10 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 615F3120C47 for ; Wed, 17 Jul 2024 20:08:10 +0000 (UTC) X-FDA: 82350331140.05.C840E7D Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf22.hostedemail.com (Postfix) with ESMTP id 1F7C5C001F for ; Wed, 17 Jul 2024 20:08:06 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=HpAHzNR9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CFJBvBNq; spf=pass (imf22.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); 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=1721246866; 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=1JOtMp6ytkbFmdJPiX5X/B9862zAZNwTtK3hdHWBpPk=; b=aq2Ll0IoAyZGz1H4EBxnAKZQes/XK3KNOP6JcJcT/QhxqnfPsfRkxF2FiqPaZ2p9QZAix/ EHzJ6RLqlVxkWIoCkUMtSZ0cEdMCu6Rp6NCjfA3GBCvARD9pkVNMVofMQWaa3slJLhW1jZ cNw5h2II6BnA7uoPZGAPLUSajvOxhG4= ARC-Authentication-Results: i=2; imf22.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=HpAHzNR9; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=CFJBvBNq; spf=pass (imf22.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1721246866; a=rsa-sha256; cv=pass; b=X42HV7NIxhrWC3Msxcz8S7qAXtNHgzRDGbrZPZheScA40zNULCfk67OjQIrUXwEe1LC4WR OvIR+8OVOUp2Ndb1eBzGzI/T/gPAajpsleZOaRtyRDglHOZVjAiVywJllFagh7YTcIc+im kBV3CH2w77UelfnxcV0FiXjmCBLf0sE= Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 46HK5ARs002719; Wed, 17 Jul 2024 20:07:58 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=1JOtMp6ytkbFmdJPiX5X/B9862zAZNwTtK3hdHWBpPk=; b= HpAHzNR9yFPcLvRudQklQI4H493/DxD7zuA3SlC5gAfc6md8ccwqp3KpPJxIfpWe XLFd936DhId1/4MF0g5XXxISSW0vykiQTRyNB1eccE32sIpKhtXgQJv7VvvhtSig ImZuvbegtX+rkj5elZ1XtWOC49pw2oxPhSMKW1Iad7qGAZzEj9ghKOoMCYDnWmFS GDNRIKlfNGvwGfxdMLfbaNhVZbTZ+QTdpyHhsYzqoAA1OBQFax+sOmfugfpFW3BY iscURLt0dtu4Iudqw9yWhPGlzejk29EWaP6f6t+2ukPUQwDgxyzTfi4aW/jbmhjC UI/V9VC1t1Rn8xminiFkUg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 40emp5r08n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:58 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 46HJEjNZ020154; Wed, 17 Jul 2024 20:07:58 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2046.outbound.protection.outlook.com [104.47.55.46]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 40dweyh8qh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 17 Jul 2024 20:07:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Ye4YG2AJim55+RJiaKZBVInQ+8vHneJvfNVl7BEJapPfa6AfPHgbpeJe2ATrO4Aq3pO5BJACr8MfiqIYog6re0Ra9k9WDtDRiHlylzmD8U4ENYkpTam12/WukivoKUgt/T71iOaJdedqO51uMKh4+XiWcwckHPoT4feuYNBV7WG+LgO6jw6k2riG21M94rC4fnBIJvdE/g8OQaaA3I/IUl6c+1rqDC5H2gBkw33lCB0R/VkonIWjhU4txjKe5TGOk995zZo0WgsFQUGqcFB6aPtCebrfgF6MEz0d0hhYmmzXOcgmfBXPp9d8/eBxwCQCYWOfvV0A4m3COZVw4W6ROg== 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=1JOtMp6ytkbFmdJPiX5X/B9862zAZNwTtK3hdHWBpPk=; b=SEGHyDLGHjW+mQQvSvNK6E9VC2o76yfgxOP5pMInXiaIwPSqrTfvSiqrWDlrKpZ+t43cjozwypn7889x8kkLFH8lqMqhAbuqfMgfiPO2zVJ8uB1jquSfYP8x+T3LbZNJ8ksWs3fpAvodAdFUXHk4/KOXomr8Rb5u+AUVR7MZjQ8FcQnSRwlokivwKCWzb+OjfEcxPpr1ly0hxnWY0BzCexnR32ysXzSnrYRHJk5N3gXTdHWe7zH2E5dPZm2VUuTh9EIropmsNOwI6WdRHdNl/L1Fx6d0pBovONwCFhwWHQ02eBby457WUu1/S2JMWRYCJrmMfdMBAMyi9Oe4TXGJvg== 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=1JOtMp6ytkbFmdJPiX5X/B9862zAZNwTtK3hdHWBpPk=; b=CFJBvBNqLV51Z9DMzlTWzNRZbnFDGRNOdZLnBjdteEsLhe1c639A81pdBzY2fd3Mkfdv31yXWjYrtmdHk5hHz/4inb9jf3VSUlmz3f48n5XJn1pkn599FjVljCCePjPY0T3B2zvwsv8yQQqbd6GyoXes02TSDM0t5CBgjhuSv9Y= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by PH7PR10MB7694.namprd10.prod.outlook.com (2603:10b6:510:2e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.15; Wed, 17 Jul 2024 20:07:54 +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:54 +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 19/21] ipc/shm, mm: Drop do_vma_munmap() Date: Wed, 17 Jul 2024 16:07:07 -0400 Message-ID: <20240717200709.1552558-20-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: YT4PR01CA0275.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:109::26) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|PH7PR10MB7694:EE_ X-MS-Office365-Filtering-Correlation-Id: a499ed3e-3afc-401a-61e8-08dca69c2513 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|7416014|366016; X-Microsoft-Antispam-Message-Info: sKEDJ/sRZHHtTrmXPumU5lSAlHN2+zSKMoibKTow+6ZlDjW92f+2kQ0Kt9/pU/D9PtHufMQQ4bw2DrBSBtD2vyvxZneHZYlyT8g1+VxdrNAb2Z8+YrGYoCGsZBmtKEPEaG0CAVfXuH80h+3uwE58AOn3/KFk91k1EEL03vLKgjiQRekvpf7mu9AwZKIysQ1WxdHeSpY3UZ/aBlnqr5EGn+c4lSqt9ZDZbtT3dHfGyCXsWjjN89PrnPfX/SM74H9/OyQZucSoPVZHaaR+goy+Bny5mYimHSDLqcqPlrlabwvKcgpyL0RMY2vFxqTJGseriM3pzmrHYu8dVXkzTpYzQ7P6rXSQb8Fbf8HRMlIIYBXKr8lRBFEuG7FBmNwORtk0G1Bg4z+fo2NWURvYDfBDk18nPNg120BpvvTfkknh8DabhQkeyhfDbWtATO3Uaonlu2t1OZlNQEIIhjTyV4ynoP4iOCztaYyLihtlHsgnyVE+0kYWkgjeFnbOFa39X4ikuz/PyA7s+kjX7nBgJE5J2paR9w37jevcK0FYiQJBhFAyclFKutkM//jG6GlOCn+Skqd90kbo/bRrxLiK/hp9wwcADb1LN1eiz3i6KMYi4gOVMl98puEtph35Xls5ytSQW95CUmA3LFw9mvUW6zEvCcyJPPRDiXHGgDy4/Snupf/iOTLn8AWzz2VpbiOrwX43+lJVTlSyQmzYlvokh9Qi3nCDosrueb9QEWVMmvEI1nW3L/2xTMluwhh+qG30Ca3sqjrduK8y5DckXXc7skvKZ4uk7hadGEiv8vYXMCsv8GGh/VEuzLCgi7kjfufzBB7xqmZUU1UN41+d/vpTZ81LDd205Uiof1FayRpQT0CkYz/1FiZpYByl4PmcfNs8KWmYjVW8Fix2ucA8lty/M/dN1/md12ry8v3C1kMU92k4smRh3sVMo6H6eHX9moAFd5MvFcoQuHDse8yfO+PsXECEUpNJwocDV3/lGxtIaf/XWnCYklhmGmtdxtBCqTkH+dlKSWiIdOAcIyplp9HsyvdcNZNRzvVbFH5BE4vwVG/lg0gQ5YDCvR1sHU5BL6dszmjU/uO4pxFjxPHfOv/4GDSUJAjPpUdvSIKnWtOkl660Mlj01/Lv5tbWPN7uZnxLtMQo8XZBj/dL3QK7IeEpBz4qye5TqzEjuH0iTHVLHn5RSv8YhBoEzgGooGta+bbYAIRZ/y3CvWWLAHO8iqdu2lAAzG4+rhTy6iAdsOWfhLV6vNUqyz3sY8f2PJ+fC57s8t0YlDVGWIjkKH19AYxBReCQIvVYBImBCu0ZfhKWLWsR0ZdivSxwYJDxCSNQQufNb/0BPxEvxJM6TXOsAvaUuDDHPg== 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)(1800799024)(376014)(7416014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: k0ixBapY2mCl3f6/1vhOlv7rHCYjhFDINbdQINzf7VeTCjhzGCpevEe2d2qsJESDS2C3QiUS+cM1iRgtw6TwVhaiKu2eu/wLTqt1JUXbK+E1Tau/K8MeEOsGfFzanWhi/PNR13vGROaeesNtrCagx69K+IGoJKspA+dtQQBEDMdlXJL9pS4DPwlz/9pJZgLgkz8CgrzdtCsKFWUdehtX7d/qT+zQVUCx/LBnNDNrzua+vSQNITF9ORnKBeZvYJNz5t2I0XeKGp5vxpj4yAS0IaCxbr0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q4qkc5TtaNgomnVTqoVDCXxgwJ0sEBTThvICVRKoWv/1woTH4yPgot45Hp2agxnidvwoaypQMBWkn7M5sOPjud/YRivrC+LEVD3JwnGzL0Mv4wCh9+H9x3y6S9MjF+IXe95idp23jW3WSx/O/Di9yUgdT8ge8/FKpZgkc27CD+EgEp9Ib6suM3MA7vX5cz/EWhjEMU1iuQZ42CwXfJK+jvVT6tq239Npisb29keWVz7Sg83Jml2OflqGF53ruj1hCH296Ae4Q== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 7yXKUITeRxxi23orb1uLZHjPE6ZpBIJ++YflZENKnGa6m4BZiIeTo6elpaoZBQL/ZEQLv6tI0wXBJ45k4ini8C23MgBgA13gAHa6BhIPmnIUT3WBZpJ06ttsa2GutrBk7NHP8DWdla4ip6H7MCK0yXtvAtleCaY2MEzRs78A4yydTi9hAv2dqX/+IFFmz7TRLPULAmejIag5XsV0kVg2EcN87W97l7yi2S9nzaC14WBrc80HtjC6C26kOUiYU4SM6MmjwzWv2O+MsVbqGswj43x7ApcnzDdvpTz3Cjl0LrDF5lGs78EpAkzcbu8pFUZlYQK796LppiHLdCwUyTXJnyB5CFv2/jlb02rJfAfLARMi4RiPcsX6I0JIBIIW0daukXhmrJshBaoRDeqKzQvi6mC8eeNObWtEtiQkIZZO0+7L+5uw7t3mMfkJj1qj+cSRQy3AeECMmmHcyZ+TQEOJHO1IWKHjAKIzjOBuEBBvXrLe8HrqONLauoJFF1fM6WYSAGQquhAeEEmhpe4yAFvrnVUgAJ58ThFI2ohLNNubejM4yLKCSUhBdoy8KAAh/Nur9ekzdiQHBOcyoOPHfHTS7a7z+Z8rXEfrvRLC9VAgU1k= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a499ed3e-3afc-401a-61e8-08dca69c2513 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:54.8300 (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: cPGPnt0FJv+IyJm9sivBVCZWSOvbc1gFkGLZpc1kuB7tNSh+o9SCJpVTZfykuJh0A1S+qCrpxTkpljkJebFX1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7694 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 bulkscore=0 suspectscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2407110000 definitions=main-2407170152 X-Proofpoint-GUID: z14d3hxX0ix4cqEGz7T2ONAneHPtAb3D X-Proofpoint-ORIG-GUID: z14d3hxX0ix4cqEGz7T2ONAneHPtAb3D X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 1F7C5C001F X-Stat-Signature: 9bg39aqf1xmijsrm3ed9gjpsucb4x6di X-Rspam-User: X-HE-Tag: 1721246886-664183 X-HE-Meta: U2FsdGVkX1/FUGN1QUxRd109AQa3UKy1idUAT1200cHP/nAwxmY/TOuIWU6KS1rDgmiX3VZknIIPQmqK8j8gin2nbMdIKT9dvvMn5EdFOYTswG+VOpQdxB2Zy5Mn0hJcUUPmizuQMi5x/y54ijiV+DQicPTVmPmTs7lXXVW8ls0xPp1feWV/UL2oiZcv/n6Q5up/lj9ypyS8EhvAw8wXnI9BBA7PXNf9nGrxlQGJEw0uxIq5HixIqTCoUthmclE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MwkX59eTltCSPjgYdq+7MEE3cyxb2Ygpv4tTG7YI7VXz3VPq7FdsQYQ5mWaLuTeFIuLSeFuJHvZaJxJvy9SxbOU4n3ju6avRHahDMrP/ZBN3Iv/XPx7lbOcCkzHF/jGGHBFdZcR+L6JjA/1ZhKzdXhmAHp3zMOsQGLVDdhrGRkcod/EVFb0hZBOEnt4ogZ83j4OA== 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: From: "Liam R. Howlett" The do_vma_munmap() wrapper existed for callers that didn't have a vma iterator and needed to check the vma mseal status prior to calling the underlying munmap(). All callers now use a vma iterator and since the mseal check of can_modify_mm() has been moved to do_vmi_align_munmap() and the vmas are aligned, this function can just be called instead. do_vmi_align_munmap() can no longer be static as ipc/shm is using it and it is exported via the mm.h header. Signed-off-by: Liam R. Howlett Reviewed-by: Lorenzo Stoakes --- include/linux/mm.h | 6 +++--- ipc/shm.c | 8 ++++---- mm/mmap.c | 33 +++++---------------------------- 3 files changed, 12 insertions(+), 35 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 5f1075d19600..49a24c023153 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -3406,14 +3406,14 @@ extern unsigned long do_mmap(struct file *file, unsigned long addr, extern int do_vmi_munmap(struct vma_iterator *vmi, struct mm_struct *mm, unsigned long start, size_t len, struct list_head *uf, bool unlock); +extern int do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, + struct mm_struct *mm, unsigned long start, + unsigned long end, struct list_head *uf, bool unlock); extern int do_munmap(struct mm_struct *, unsigned long, size_t, struct list_head *uf); extern int do_madvise(struct mm_struct *mm, unsigned long start, size_t len_in, int behavior); #ifdef CONFIG_MMU -extern int do_vma_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, - unsigned long start, unsigned long end, - struct list_head *uf, bool unlock); extern int __mm_populate(unsigned long addr, unsigned long len, int ignore_errors); static inline void mm_populate(unsigned long addr, unsigned long len) diff --git a/ipc/shm.c b/ipc/shm.c index 3e3071252dac..99564c870084 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -1778,8 +1778,8 @@ long ksys_shmdt(char __user *shmaddr) */ file = vma->vm_file; size = i_size_read(file_inode(vma->vm_file)); - do_vma_munmap(&vmi, vma, vma->vm_start, vma->vm_end, - NULL, false); + do_vmi_align_munmap(&vmi, vma, mm, vma->vm_start, + vma->vm_end, NULL, false); /* * We discovered the size of the shm segment, so * break out of here and fall through to the next @@ -1803,8 +1803,8 @@ long ksys_shmdt(char __user *shmaddr) if ((vma->vm_ops == &shm_vm_ops) && ((vma->vm_start - addr)/PAGE_SIZE == vma->vm_pgoff) && (vma->vm_file == file)) { - do_vma_munmap(&vmi, vma, vma->vm_start, vma->vm_end, - NULL, false); + do_vmi_align_munmap(&vmi, vma, mm, vma->vm_start, + vma->vm_end, NULL, false); } vma = vma_next(&vmi); diff --git a/mm/mmap.c b/mm/mmap.c index a32f545d3987..ca752317adef 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -269,11 +269,12 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) goto out; /* mapping intersects with an existing non-brk vma. */ /* * mm->brk must be protected by write mmap_lock. - * do_vma_munmap() will drop the lock on success, so update it - * before calling do_vma_munmap(). + * do_vmi_align_munmap() will drop the lock on success, so + * update it before calling do_vma_munmap(). */ mm->brk = brk; - if (do_vma_munmap(&vmi, brkvma, newbrk, oldbrk, &uf, true)) + if (do_vmi_align_munmap(&vmi, brkvma, mm, newbrk, oldbrk, &uf, + /* unlock = */ true)) goto out; goto success_unlocked; @@ -2865,7 +2866,7 @@ static int vms_gather_munmap_vmas(struct vma_munmap_struct *vms, * Return: 0 on success and drops the lock if so directed, error and leaves the * lock held otherwise. */ -static int +int do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, struct mm_struct *mm, unsigned long start, unsigned long end, struct list_head *uf, bool unlock) @@ -3348,30 +3349,6 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size, return ret; } -/* - * do_vma_munmap() - Unmap a full or partial vma. - * @vmi: The vma iterator pointing at the vma - * @vma: The first vma to be munmapped - * @start: the start of the address to unmap - * @end: The end of the address to unmap - * @uf: The userfaultfd list_head - * @unlock: Drop the lock on success - * - * unmaps a VMA mapping when the vma iterator is already in position. - * Does not handle alignment. - * - * Return: 0 on success drops the lock of so directed, error on failure and will - * still hold the lock. - */ -int do_vma_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, - unsigned long start, unsigned long end, struct list_head *uf, - bool unlock) -{ - struct mm_struct *mm = vma->vm_mm; - - return do_vmi_align_munmap(vmi, vma, mm, start, end, uf, unlock); -} - /* * do_brk_flags() - Increase the brk vma if the flags match. * @vmi: The vma iterator