From patchwork Thu Oct 31 17:01:37 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: 13858190 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 684D5D767EA for ; Thu, 31 Oct 2024 17:02:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E14326B0088; Thu, 31 Oct 2024 13:02:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DC4F76B008A; Thu, 31 Oct 2024 13:02:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C16BD6B008C; Thu, 31 Oct 2024 13:02:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 9CEE86B0088 for ; Thu, 31 Oct 2024 13:02:03 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 586001C6C83 for ; Thu, 31 Oct 2024 17:02:03 +0000 (UTC) X-FDA: 82734514128.30.C6796D5 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf21.hostedemail.com (Postfix) with ESMTP id 4366E1C001F for ; Thu, 31 Oct 2024 17:01:08 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ddmboRI1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="VmubW/n9"; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf21.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730394039; 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: references:dkim-signature; bh=gPE0z606kxurXbtaY3gV7/VY+Q2UzlV7FHgKR9bZnsY=; b=RfA4VJyeAFZpanj5fyyxds4fLdD87tYQ6iqYtw+ZSJOjgQ3ilFDQw1tnqMxKM8xi0UbEl3 9DHylAETGmEXsiZ8DgxbCpKmH/fN50xIHwnGlYqRpJjmttVV2C3k7PEIUtljFd+V5xk5AJ BGnFxZYV6zEmZcfQnHmyS//FOvc7D0M= ARC-Authentication-Results: i=2; imf21.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=ddmboRI1; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b="VmubW/n9"; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf21.hostedemail.com: domain of liam.howlett@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=liam.howlett@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1730394039; a=rsa-sha256; cv=pass; b=5wwtXri2gzgN50q67VRQ936lqLZUihnuEyrYDoSLTXm7+reg17yPI1tKwNLpBVg+CwD/i8 +LprgXBsIro/3kY7s4UdBdwG+OE2V8adLuIy2lSHUGAMEYYsTqr6KKUGVr02C5bShRkfoo 1fVmz0+MJxE9rInFTC5A+sFozfAzF18= Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49VGwTMO021893; Thu, 31 Oct 2024 17:01:55 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=corp-2023-11-20; bh=gPE0z606kxurXbta Y3gV7/VY+Q2UzlV7FHgKR9bZnsY=; b=ddmboRI1WeFmQoe5v8Uvn4DTQ4mSwYx7 UxfceoqbEyDP8v8J0prHrRkpMc4m8j7dPA4F6HLwSbWUKFdD8JFR5bilo1tcfWMD xMUJIr3VU5Qd8BDdR27dFf0vLllLjKGMY9k7RB7tZPaCTXzwTDLekrF7wsWZ6rMI /h7aWOUNozDf5xdba1ZMma1XItCHY66ZQD9g5qjjqM+P0cLfPeGD6OCjSKXc/pcm 16I0XBNmifszaiLGCcz6ehPINbwQMGRI8OLtCzbROInd8hvnHNlFJO6QciVL01Pr 4mvIBl2bx3y7Wl+7adK4FH8te1YN5FH7zDa8QUx9uHgJwB8TSjh90Q== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 42grc22p9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Oct 2024 17:01:54 +0000 (GMT) Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 49VGt8Hc004798; Thu, 31 Oct 2024 17:01:53 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 42jb2x6bc7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Oct 2024 17:01:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dpT6LW8vUdivD5aS0X1I/LEHvpPJEmwnbpplNcMpPgJUBTWDouti8BHBuYKFE6PnQR6nibdY35xiM2u6n/imp0IigflQAY8uhSObwZgFxHJTKaNIP0n0Zh71UK7F7odLwtl8fEKPvnisGE9DQFzZUBKkkOBXEOJc9WQ98A9RHbfeLrQK16IKXZDU6NDmg7ilvzYYOLYlOQ5u3k0MXH/RFGVC5bwFTyys3cXIHubO0k7gOZT4tXKASwG9h1DxrhxtnPMuBKaDnRxnOC3axhohxnOhBWz83rkDOie0yZi3CgsSmts7WdQvZ5VjE5+INzdMYLI4kdzjYPf0ECsjsESY2w== 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=gPE0z606kxurXbtaY3gV7/VY+Q2UzlV7FHgKR9bZnsY=; b=kpF7x7T5tXdCVoSPWoOtb5dIpFjmXE2e6h1GTEYmgmTEN/+JbMQo3wq4Vk/vC5Xkwp1eWr1OYdcDhlpRfu+5fiqPHERIZ1x5FqEpR8Y67Raqc0HeUspCI1bDqyLCGZoyGDAT4ZEQIxR5iOOCHPJn3z5K4u7TJpiLpNfLAFqEdFQr8PKWOcNgMCF+ACQLtyiSwLDD1ighhucbL5GJRFxMDTzc/SZVztcEoSKGCn2QIFnfRpDta06RIL16J69O3vgdHL7Gz0wZjiz/83EDdihIOdBeS7jLBloHoOe5/2vI3QHVu4/Db6rbwvbYs5X5JFsa27agWTWoTxW4LAQiWniBaQ== 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=gPE0z606kxurXbtaY3gV7/VY+Q2UzlV7FHgKR9bZnsY=; b=VmubW/n9xe+CYxMLf89o51DJzDb3Bc8Q+k4f9lvtZv/akGsz1cqRoMjS5GQX5p7yV3hYG3DLl+inzns5G53ttpKfbYAPATkZVgzDgLPzhQg5+E9YVqM8Ohk3bRRdNEwzmQiI3XEm7eD/88uVVdIr5agB+b6Ff+tsjV0lInM8Xrw= Received: from DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) by SA3PR10MB7096.namprd10.prod.outlook.com (2603:10b6:806:306::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Thu, 31 Oct 2024 17:01:51 +0000 Received: from DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490]) by DS0PR10MB7933.namprd10.prod.outlook.com ([fe80::2561:85b0:ae8f:9490%7]) with mapi id 15.20.8093.027; Thu, 31 Oct 2024 17:01:50 +0000 From: "Liam R. Howlett" To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" , Lorenzo Stoakes , Vlastimil Babka , Jann Horn Subject: [PATCH] vma: Detect infinite loop in vma tree Date: Thu, 31 Oct 2024 13:01:37 -0400 Message-ID: <20241031170138.1935115-1-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.43.0 X-ClientProxiedBy: YT3PR01CA0044.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:82::29) To DS0PR10MB7933.namprd10.prod.outlook.com (2603:10b6:8:1b8::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR10MB7933:EE_|SA3PR10MB7096:EE_ X-MS-Office365-Filtering-Correlation-Id: a0e9cfcc-cdf5-438b-9b2d-08dcf9cdb69c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: Azwm+iFCJBqYy6U3CAOZrz2hCJZmdI6bCEzlqCW/4ajc4Q+bzhT5Ng0jiHiQnn1QOskVoTg+7fVdWDDbHrBMNo41xLNzI1WEMH40PRxQJivZcroIJdaJciemsm64btPtMMFUmWAQXaHFLWGJeBqBMwdowFw+h3mb5Sg4evOQbAmzvwCZYzFewP3VHPpa3mNyb6JPjFvOquMHfn15D3dtCN7cz0SSTmFR1fKjTuBe/FitIB70pVt8ViMH2BYyDGwhMrrj2lIBsDoF++VjQkLj2eVhhRG+u/8txZnJmBRbNWBzZhsAQ/YePZtAgyKNvqXav611/+DC5AJnT6NKz6ppsi8edc0aWH8/UtA1OfBHiPeR5bJpkUwaDSM3vjcHJjAn2zxrRzTar6cDwPCbVMaK4MiymvUyYqqz3uV4ReepcmfNj5HYWusJiLmrAT0gAcCzjhRi59X3f1VIY++n7uTymK7x6KQODrNk+nozcLijEF8dCOIxzyqIGMFMEX8hpDgC6naH94QYtwjbXyRfBmJW9pZUGJ3fXGdfAA94POMM+oKfSHJ+sxWsalSsdIhzaOMUSSKU8vLJQEPI9qGHw4WizNqEGzuVzv5xnEtsPnlWLbyWeJlCSSztIVLAqr+OYpDAxFSetJy8D2RRZw9QB1/rTD1qpY80E0QheFN4QatJJuS6cnzOmk2OQn0ACJSmrlr6rj2O+quJAUG4X3j2zmEarWF/MbKgAd5wEt0yUp/Pvk/t3VEnDGRIuxKn3S/gXbD8lp+FGEdKycabwQFH+1vfY60YcPmKDM9As4Ag/qDw+2gZCFArH0dTV1BIwvj236Q740IGfp8NNynio/jyo3+rlfYcmzZ3JnspeWzGphbYKi7gLlRo/0tYvSIVGYVKN8V5+5VRpysdUDJdIrKEs9S1MJkr028Vt/LHVip8NeLrRBc7U6lIkeMIAxMPdxCo8qOvBL18Di+3enJsbEK/A7eevSjSKhjYDRGL4HWf+1yMaOrflqjBHMm9a1Twk15Mx/jocV6ahKjjqdmMFxbZxj6J29ulR0dfUEPiwVwourZs76/xHI0p+6gD0bZBMczBDgm1CmkKKtl3wLom1xwdR1+si6gCanetIGQ1iOKyzoJahuo3ZYMqrD6cSPxNnp2u6Pj+Ifq0yQ/qAryHDDZ1qeB5318433JvheRtOlPP7F2gjNMLMMbqq+6qr6GsAKRCo4xOAW1B6CtGC3xg8jZzLeNTGBnd2CBAsFYaQzLDyVYSsUJ9H80KQDcpF7ZMdDaMZzPtmsMuwPMG/VLMInbhV103avm0s6+hSh8y3xhMoXaRKPjro8sXisqxC7O3Rno/ZWIZ 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)(366016)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eT3zxhSkW5OSV6jDWB3eg7/AsHrWB1/7QNZGVRYXS/5z7XKAkMoGmJqvJ9A8F93x39DbDLQi3KqljIYaB3nfc24Zi9AYs/1AUpImPDk0JTUfexYLTsiBeGcYNawazAHQbEodrRClPO2ysPn7vRmfffojYVvnPFygE2bbcc9em+zhvTS12tQNblpYCtI1Y+y7VnElIswzmLvWf54v9Dql1Q3Nw3kJgiluZb1p1BitI6H46+gfE2CtvpN8g5HhfOg4fJOGyVgZveet7cQAhzeiXLQyWXBQYUkdsvwHJzfnv3SAXeQPU8YS2UcguqlkGugzTbPuAuTG4o/8T8ykZLlc9rhGQxDikq8Chrgec+1BFkC0TN0J24ck60lvWTjQc0nUbOvuco2ZxDjVtFlF6mAkd07uCmWxIihFj5jylDoOZZLwsSFfBoXgMKzWz52ck0rF3EpSjg1HAT0Ips4ogq0h0OOmrhLCWJYw5IRBVr+0GefGY2urz5DHjAraav7whn6rz0INvpl66fOnnM9vUxzM7sivvL/uie4HardulVBZvO33u4iRVpEOnwWwEDA1I6queH4mbdzKjSvZfu9b6FkWdxhACN7eNHxc25iCADkaVo+nerMCAh/9nWShWwBKmzJ6cQFmsHZBdJUs38q1PGIVxzePCyIWgoUtNtTEDvC7JU+D5WRKYBdYvHWidSeRMF8YSiwBLumKPJ88q1XsFtHxeUvhBHL8i/fqBq0iMIFkNo8mVPAyRuiZsctZdM8hFKZNM9ZDWlI3oQS4uuznCq5Y7hO7MUpJ5Wab6EidFUwkzy2LldYDSIWoNXdneOXzqa8DGiFzZiVTCN9rsVN0k8AbIDzyV0oZrf+RG2m/0OoSfHJvePBBR7chGvscwCjRBRkkF06g+6L3d6wYYOoVq/YpT633WSkbcJGmDmPJVqpTizeddeHVB41jK+VOVpxb4H+YqTrvCUo4kJifdw8Q2OSLtpc3JE5iJXWPryllq0K9j6NZKi24+O/ISWqYxcLa6tJyCDgFW51LNTQ2JfPUX/8Tu6RS/lGhqS5J0yBAiRMIEjoh/ID2+2XYH9SHH9X1zYWht0Itii9/9L/Yg2WnwAla6UULLTOPt4thj7lEX9il8OhFgtyH3NC5EWJ7hrHmoEQNZxCvtOIDr8s03gz2RpGynzzEIJyNdItDcxvn166RpZJZT1DLpH7/4m0oavVGFDfbLukS+6gDv7HK1qT/CL4RtK2/CmRdMxzfpgEHK/Vx8sP8PSz+riuRCHvhpiuazHoa2sLFy7cxRgbe+IZDtuUprpzDZYYzi0mUmGoLKI2P7ppi8Q5Yf3eZ5hzYfcqN80mP679TA7Wm7ouZWT467vzKSFoBktS5x2onH0i9Ek7+P5W6zXbL7NMAJ3WKhh1IK2uiB2ieBXLuXgK/FRmoEY9IITdiEfpJw7d56i3AYMYf25uzisT8mIQErHD0eINRauMwvlB35HLWqirnD1pyOAzkWE9ybS+ubizSzZ6HCvS6XHMX7pTbihP3n9x/MPEAMg0z61SMY7JSgukDCLbXeG7ASUEgMnaiqLtoQ8yL354SDfykiGSSLyjwQkPzzIYEZght X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: UDNmbUrrVhHIBRCQb/JtUeb8lnfL3TCTPix+tuTmoQEkNE8o27f7Sjtxr7OJD9RmcTSEf33YRNJxOnbIsZqm+wtFB8lnVEheUx5ZhmOgipqLB+c1Zd2FMsvCGgi729svoXybPg7Iq4UThxwn8BIhIueHSaAVD3k3YW31dNxgMLMxCKj9VFNwb3ILLZ8KrLnj1cQBuJPbdyc2syRIzM+Xy4qaGxbWv7oz8F4nep8o5S8DATyXNZpVaQWBfgoRIoR+fEGLPuy4QpRozWlOvsT+LaK0CFnYTbAjISr8VIbvvDRJ7dnl26mqZQ9oFOY0+9R19QJFiIwCIFxW74XeUH2FPtWuWWF86UOiE7j1Qmz61WC5BqdpBEpYYzVewwYTwq9+f/n4lrFPLOlUCic0ZDmevZhIP4k334teaVk3uKBsXi4xqq5d3YnHGZFEBioPArkOp0rW+9gF6TA+UyBMrawb/NfGuIKG1u1gZ5KecDX+LfVIoHAFOwj27BPqqY4hL6YHZf4mnOjfqgsKWdNIiM2msy/oU2aW8rFgxf7D48wEYCxowAnrqPZkh7a4nFUJql8gC+K5kiMU59a8unDZUGj+EcpU7x3Oc2ZOmckLZJjt0LA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a0e9cfcc-cdf5-438b-9b2d-08dcf9cdb69c X-MS-Exchange-CrossTenant-AuthSource: DS0PR10MB7933.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Oct 2024 17:01:50.9177 (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: YyWYqvCoLazhWTJ63+Xa+U4ckDWkwbQ1jwAkuQETPECsLID2GQZNPOVSn0IcvgwbrckptLac4meF/Rqz1aPZ0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR10MB7096 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-31_08,2024-10-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxlogscore=802 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410310128 X-Proofpoint-GUID: d6J34eMugjpJAWHQrmztDTu8rxf984Pp X-Proofpoint-ORIG-GUID: d6J34eMugjpJAWHQrmztDTu8rxf984Pp X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4366E1C001F X-Stat-Signature: ibnuxjute1bhqx4ghwffwnxgwio5ywhu X-HE-Tag: 1730394068-653900 X-HE-Meta: U2FsdGVkX1/1yATPiZoSbdSdIi4RJXsq9girrdl+7i0GYcaZrIb+dimcbxq0xiLpdIuTtBp6VTbE4t4zW1slM9Iv4wvea5MlVOLKTognCQBJnllVhj+mJtmOCYR44uDbRusCY0hSUgZkBtbo52pl2vPO5+L4BgKSjWYoTr2R3MGDzNXp4MhkplWeA0bLJvGaKzOAEp9Jq0DwgYDVX2fcMeWUnaF6Y557sT+fmiio2VaUAbPffuq0Wdm7/3rmvXdLBPD+mVYL8UIVcvHrMo2yvI9vBX55XSv7MqdEWUqHZ1k3NmyROd9TWyYhej5RFv9ERWOkttM4pkvw2fB+2Kd6WkHuZ4u74KjV/+pLyMNbvTXJoUes3Vq6JxKHQOXX5G6whc8T5VdbUjdsyIiBc5QW15yweNXO1jFvLX8v3XT72zX4AHb645HbuISfANCMI9N9H3hXWv8kLd9fVngxxeTx0nlsCrQVN+k57sneoZPbMCOJjYxYEawUcC28zFSXVaiyV3Y00jRAV2abImJ4zxM19f87O0z2LpOjOI8Uh4qrqhQF75I8YXG0gLcEXEMfqYhHtrsLr8rcfENl/h9QqmQMIBixd7saXsAg6ZQXsDXoXjMW8ymKKe35cHPnXiRBkMa9okyi8qGhuzaP7JQcEIdjLceUevSm2SBc1ses+KzlSpcDbL852W5klvIdrLnHU6tI7ltKFrQZFwHBT1t27BoJUArFPZR6+6H+KU+XSrWDzyb20sCezmFJYGqG/qcTgnSbpkS6LdIEltuoh3w6sUFdXX7q1Xk+5oMT4tB8yOy8lXzz32PO1vfsN0CjjpzR27aaHrkLqTOh1h8rUJIY6CeRIu823SFRYdp2BlCnavBLtDqXPqsUTwZEEilPy95rX733HoAhSlSDgtCgCs4b0ewExNH7PY9KyJkKRjMQNks9DBn6bs09XF3ob+P3gRA6dr4wS3xXaNE+faVb/6K58jt jM5cdaRA IJ94jHaee3lxuKJiD4gzwSU6WP2RFojVTdQweRvov4ZCDtQ4Ih01RIXwYzgDdicrW7eSPjVGWzVUesTpXmq72lCHZRV963PJobyxZ8zXLIWS49qf8HmkfHvffUu8Z+fwBvzpbOpzh2X2gLQkLatnrLfk3StzyGr/y1dCktiaDmCwR+T7NwlTvbu/bthl/zRX594GE4lQsAMW0XJUxwF03A9nun1IHmYaM5yOnOeF4RAf9fukcs/RO8taBd0RgJIXwd8F9jXq1LoqpeFP4j6IaCgJunHbvQQtZI7EfVTFam1kNzP6+vFnfNS9YVAmOEWEDgtADGylAgfyyED26z4YjP+vBxWpyLI4pGINTg4ZwSgmHjSjjpMxVi5tKnE5GTAhfMO6K13AL1pRW0sleMGdVaatLStQQGhHT7R09ccQdCJDbnEi+KCo6l+lC18q4VNrHRCubqh4zByKoZWZLYHRTROVGF0XG6nnjWnf9QMPUoxZl0oEdZV9/STYRlB5fi5xXcgnQDEnkuU3/QKMO4p53O8l7IQ== 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" There have been no reported infinite loops in the tree, but checking the detection of an infinite loop during validation is simple enough. Add the detection to the validate_mm() function so that error reports are clear and don't just report stalls. This does not protect against internal maple tree issues, but it does detect too many vmas being returned from the tree. Signed-off-by: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Vlastimil Babka Cc: Jann Horn --- mm/vma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/vma.c b/mm/vma.c index 68138e8c153e..60ed8cc187ad 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -615,7 +615,8 @@ void validate_mm(struct mm_struct *mm) anon_vma_unlock_read(anon_vma); } #endif - i++; + if (++i > mm->map_count) + break; } if (i != mm->map_count) { pr_emerg("map_count %d vma iterator %d\n", mm->map_count, i);