From patchwork Fri Jan 3 19:35:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13925829 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 1A6CCE7718F for ; Fri, 3 Jan 2025 19:36:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A2CFA6B008C; Fri, 3 Jan 2025 14:36:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9DD826B0092; Fri, 3 Jan 2025 14:36:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E0676B0093; Fri, 3 Jan 2025 14:36:04 -0500 (EST) 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 570EF6B008C for ; Fri, 3 Jan 2025 14:36:04 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 0ABBEAF696 for ; Fri, 3 Jan 2025 19:36:04 +0000 (UTC) X-FDA: 82967146248.16.50E0010 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf18.hostedemail.com (Postfix) with ESMTP id C241D1C000D for ; Fri, 3 Jan 2025 19:36:00 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=mgHOEZc6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wJBLkkTV; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf18.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1735932960; a=rsa-sha256; cv=pass; b=q0dk5FwAgztqNjf8CoXEDL6fPfPJF6ai+HfJuU+tp4JrYs53q8rtYohgaHWg3dZjVyfSmr LY8SRgrhXPv0pFnEdjLTH4pbq1RvA5P96XIHAWAgVHnRlqI4YaVpbzQxVxCzqwT2qslgpG X39PnMw4eQM5OCM8RyCh4/7Oac3ilUs= ARC-Authentication-Results: i=2; imf18.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b=mgHOEZc6; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=wJBLkkTV; dmarc=pass (policy=reject) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf18.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1735932960; 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=3jaS/xLrAjAhPiHbJzeTkokGziOM4zC2CzniFbbXxRM=; b=O8Y2Vyy8VWmFY4K4okgc9kxd2MGf7Q9nyXndWsfRJCqQmKX4dBqy8TZaud72NQ2CchfB3x hWg1PwQXmDjBtp6ebYbj9D4hjYOrzBcYyw0uLoyNUxgcW4TeDB0ixrbCjkRw/pBzcXq+Pl 9aQHypD7/BJEc5sK2NyscjYU8GYPQTM= 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 503Id2Xe010155; Fri, 3 Jan 2025 19:35:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=3jaS/xLrAjAhPiHbJzeTkokGziOM4zC2CzniFbbXxRM=; b= mgHOEZc6EfbWY4DhaodlEkQRvuD156xVx6WPiafR6pC5sBlgYjbtTQEPeKlXOPk/ N2zw7d7V4Fe83WsIn3kULB5cKAnviHB/tAtwBJLTQX/qBF78zd7QxPigB9im9fXT Z5mM18XEkz21akNOgc0304cSZnatBD6cpoN3firh/XqlMoPtXEZx2yqF9CvSHFbf QykSIn9m06DiRSrY3ckt6U0uhS6MulegfiwZ6YNVilHfs7Ok6v7GYPpgNDHeR3iP cvQDJWtiNRf92l4TXO0uJtGnBy3JccjzAkfLAbsqONORVBjnTTUtEWOKlKWR1G0N Ws5ngB3yGS1N/bi2DOb9pg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 43t8xs8jd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2025 19:35:57 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 503HZI0g027650; Fri, 3 Jan 2025 19:35:56 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 43vry32nwa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 03 Jan 2025 19:35:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h2lLZnb8aRBCA1wg5/VbiweB9qew3eFTWRS9gcC5XSo8zF98s7ez4gD5wD5dEyLBCE1nI78sVayvN16AUrK3V8aC12Hj9mURK6DfEcmSB8h2mYSHQ5sHSfsssHRx2Gh4FCHkBJCLc0fHi0xUITd5eWkdrUVvm3SDzso/z0Ouwy0fQSgt6L0FLJrx+/GB/WbaHP7jRBhWqZJx870zkFpx5bz2v8ok+ZyaQ2hQR2mAVLbrcPOLtHkQRzvYo9YTwXmVmD/zIsVEKKh3Ppflo14nNd9CPhgQYlmk7ZrBjAonteL6r3/mXxAH/UVkqHvU59VYVFg/hRc4HtyEAVB3g/Op8A== 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=3jaS/xLrAjAhPiHbJzeTkokGziOM4zC2CzniFbbXxRM=; b=x54rHeHQ6A8RveeQNUQQO/b3Pa4AhiSEd7pa/dkXmvVF/K1laErYqtJc/L0p9A3DUNqiphPMFotOcuW08V2Vps3chBMmeJvrvtpsfBZiErXSXagKHHWk8cVJnW/+BjW2MlyLBGNPr7xmDcDF6poujRPTisuO3j5DtLlUlB7RxN0Sfp2cs/2gJ7jtfEOmw8clqw6lPihqHfYU3iZqmDy8SKmp4wFaCESCfNojxGQ7a2Ka7r30vprhYC0oG+UtTAE7PMXW9q3i8/2//o4w+bp9MjB6N8+McIXrdxMB/e71eIbOHHsiLEJroi6B5RwCA+Qh60VI7OJBEQ6wjrOF+qie6A== 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=3jaS/xLrAjAhPiHbJzeTkokGziOM4zC2CzniFbbXxRM=; b=wJBLkkTVsAlNLUa8DNSpqTJwmvxEbl9gdObtjsAlqT2Bnk/s8wBbUI5X6PIaE5dZV0ReodmZqmpywE3ASI8JhyjYJEez/CxY5zMdC9cc3BXbHm+N183YClwJZ1LLebzQBO8Vz4fwqa7AYMPgar675YZj/hV0bZm7S9jyRzcLjRo= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by CH0PR10MB5163.namprd10.prod.outlook.com (2603:10b6:610:dd::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8314.14; Fri, 3 Jan 2025 19:35:50 +0000 Received: from BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9]) by BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9%4]) with mapi id 15.20.8314.012; Fri, 3 Jan 2025 19:35:50 +0000 From: Lorenzo Stoakes To: Andrew Morton , "Liam R . Howlett" Cc: Vlastimil Babka , Jann Horn , David Hildenbrand , Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 2/2] mm/debug: prefer VM_WARN_ON_VMG() to report VMG debug warnings Date: Fri, 3 Jan 2025 19:35:36 +0000 Message-ID: <986e45e9549e71284ac7a7fa878688568a94d58b.1735932169.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: References: X-ClientProxiedBy: LO2P123CA0071.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::35) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|CH0PR10MB5163:EE_ X-MS-Office365-Filtering-Correlation-Id: f2be6784-5b29-4249-f483-08dd2c2dd3f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: qcdUZSyp1RwTpAc9Q67JeZOwAm6vRXSUcYBJy4/UZbvYwpXa0RcSGiSX8liYFX54+hwJu4VzOuvZP1vFr4RmRNPNhOwzyM5DCrHSDFYga5v8MypdSEmTwsmJlbiQhCJ14U5ndt7Vtb9E0vp/lJFdajXYxZ2RSqM10nV4Kp2zbK2kX7wHOUfHNKtSheYeYKvMFls0QFxtn4IMV7VSwiuWKCjGVA+66xpwgodXdalW0qWd/UfBPVvSu3KLc/V0WCW53Z0HFMP2Q+Kb1OKybs+jvmDTe44dkENFb3xaNdJXlydWklCKhnsPM9hMhb09L6tLfMf6umU3Y8xjIyIyqAq3KEglcY3boU2c/nHIVGA8V5ZQlhiYxGe5G6PY+CRpons2O0ram4xurAGj4pghQOztNdwrXLTNdkWcHviBCHRipfUoUnojH/DYtNPL4lvapXThjkELnaU+SOoUfBcFrkKfHHLNgFBmQs+zKObIwFFQq9mFsa/4Gez4ML2KTyB2CblPXtJtcmP4jMfGkW/mIH4K4wpggz5qB7tGQY8oNj120rTaOjL52q2kThOy+T7+ENN/5uPesVv+YNwxlJozkVnmeMgw/QiFw07JhgI07nu354EVPdpgv4l5Z5w/JT3as55D7IBc+hU+j/OK/cq9WjvQ/u1aBBX1COPbvXE6PaNB0soCzR9Yu6CHdNYy8gZLJkSYJEkuxmDqpKA3TQj2kHimp+WkoEf6mRW/y3x7+M412qa/WjyRQtjy/4XI2lNeYR0hM74J38MLC2+yra3EOsbgpjJP5VZ90fN7jgQ2pTGpYauq2E4KbzFWu9VDV7AhOugvgxCzW5rl9i057F2ENsZVLWH7ApFt9mAbswILMzmK819w8T/3PBrfdhuw0uY3cDH9X1wjhztW33nIk5Lvwwo0SFfNzo69dapNvjSOk3mxXOZnYJLeT7wiRI5yImRishgXLQogNLjSnNtV5TM9ehp6SqucXIC7mYGwfVuK6bf5Vri+ZQZchz0N0BhKvK5tm+1a+2jHcpTYnW7xUzG5g70NCJEtXJwyRz4XOxQGfB9OVnq6P+TVegpeoHcGzNZXt2P0edPcVlm0V/afgb4zscUu0Fjl7b32mAywHvT9PO3QIvoqkNcsLo0DG4Oz6UnYKhKJgU1O6cf5QH9QFLtcJzKTi4CTpc0aVfymMic3QOHXPnKH9UppK+MvRLY05tk8Uw+QR1+rQd3sDxJ6X5s90GHuxYbcDGs596XzNgxgPWQ6cWQk2NCLWFSCodnHLHa+LnI7bFIcm+Oeo9iaUgmn52VV9Fy/pLyPX3+822utd6bRqU4Jgkjpf58Cc8fDZgFe7/6a43LRlp/VhlnT0QdpctHz8nDeupDhuS/oeEvEGaQMoeNmi2FtqFTtVRY4HijBNlWR X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3366.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Dxj7NmKmCx3kqec4Py7xVtwYCK6i6X+hza8m4cXm/Ekd/fN+mRRsELsMnZkQlQGq12Vs0K8L59NcxxQy5+fQ91YZoT1A5JnyxtCg6C798rQFQX4Ljol+38wP4yvqwregVjKf0AFfnllY0MoT1lsqFIVoZ6gD1NDcSsMeIoz+3bIxA/pgRsc0mwHsm6Ot2y5TJvFeARzNURopFn38LykoN3JPwROfeW2VezF6qxXqpITh69Z74HcA2+qNn48ePhV0BVbyz+XxQ2VNPoImH07fLo/slYsH3HDofhvN45QhNJ9IBW+U6nccP+rrUpMYFIyikdUSRrdYcHf9m06GglL0uv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jSjL/Ddm23kOrd+Ve1iwo8r0FgvIbwOS/jxA/JbZ6Iw219wUSPsM6q3bqx8Y570WYzaIqVYD/BFm6Y8BiZU+bteGwuHj90lfmOuxQlGIKsydOREQxv0JfEYThB1pdEasjOgprtFQM2IvMIvcHf4xV2wh3HNbt9TxT3rbAWa3x6wSKRcUolbrGoPRdICe0yjY+GXzTQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: BxcQM7NBaH9gNZEPnRx1Ncf0g0didbxvQXnrd1hdIJdyf6aX/OHmRk5XccUL2AmMoSYNJdc6xBzWxFrAfs4p8skDblp+zZKgCyB76Ly4210Bf5uflvuHhcngxJK0k3COOEEGoRgkgutkhVRCUlf4zP/X1AWvn1NeFhqEqd37lkQCzEKMwgT1tr/cP8N1cplhupEy8re95LColW4PiLkYL5Lz1o4rZsrM998OCy/JlwboW2c1Yun7jr/s5Vd52ncxnaBupv9AG9f2rve6oos8O9rT2PClYuMWojz3HzpRIk4Q1DsskVa5xABCkezkwrSylS+y6oe1sJosHGpzpN8QNLqLMS/eaVo1epWdjmyFlqAv6Uutjdh1RfknaF9DROUva5cdCHYkeaIPt29d4Ck6+Jv5ENMI2uYtVeXYyzomqM0dqoglYldX4prYkP9ui77XZhxwHDJFlii7ZO+DFUjy8tUjWLCqUuvumSMXGUobRxxtrC1hU3sfJleBGpJnizBZXgNzgcy2hdlb/sZcCyy7fWfDDjQsVyQPC6Mw/jULqmhAZZj88YwzpM8cnGBaV0wBYiMppmxonL18faNBgT6pOfu1sMcn7LvJC58nZDePIKI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2be6784-5b29-4249-f483-08dd2c2dd3f4 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2025 19:35:50.1808 (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: CTyK5d0fSg/voI1FoxDb4vJ9+WYKpojBDm7r/ovUJEZfwWfIgDopFYLePiJhv9l0JLDhwEHEzmG3hZT4QUOa71Cjbyq0w/3rKdayHpYAmj0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5163 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-02_03,2025-01-02_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxscore=0 phishscore=0 spamscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501030173 X-Proofpoint-GUID: OvFA7MaSUiREwZTnZ5xurnaRqmNao6p3 X-Proofpoint-ORIG-GUID: OvFA7MaSUiREwZTnZ5xurnaRqmNao6p3 X-Stat-Signature: of8xgaspnbykmpnc3fc8d1eaeeiats9u X-Rspam-User: X-Rspamd-Queue-Id: C241D1C000D X-Rspamd-Server: rspam08 X-HE-Tag: 1735932960-809388 X-HE-Meta: U2FsdGVkX18tTmo7embPeffWjFqVw0hPQX+nZnxs299oTqzOS2bJ2jBnvbXnEacZwvvaPH2rDg/JG2rTnF4Vg2gQVnf6QCE6hhzLsFsU5cNq/bzi+KMmW3JNJE9UhPEt8VyE4cxC8zamw3Q20r5z2LAGg5/468tEcWvALhi94VZf0yOo/rtH/uEZDUDjPC2uh3xzlbm4fHgIUSUr7DaxOervC343hg0ZyXxHCm8akq71muub0FdP4oh07rsX31rSVlIBNmkX7/Ix350uB5NftbSNzYSyb+VSyF0PKzxlIsZNAdpEYqxij6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oEB0EvKwhnVGslXu3sZUyg2+HhDc/6BhkfvY2w0TR6GKm9A2OrALeMRZy0xbbbp7LIJT6YSjTTBLqXqZXzuBKTUBm8nLkVDC2T6dZwSJt4lMGnmqCFpDjLKk3n8rAfSwOyLqLXqNtMOiX/vu+NDn/i5qZjcWCb/rcyH1EffpyvVhcUlL3D4qf2H63VruYCmcj02Gmv6EcjwW1zgSzJ+Gwti7O5APE= 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: Now we have VM_WARN_ON_VMG() to provide us with considerably more debug output when a debug assert fails, utilise it everywhere we can. This allows us to have considerably more information to go on when things go wrong, especially when a non-repro issue occurs as reported by syzkaller or the like. Signed-off-by: Lorenzo Stoakes --- mm/vma.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/mm/vma.c b/mm/vma.c index 4cf2acc378ba..dc843e32b3b7 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -726,19 +726,20 @@ static __must_check struct vm_area_struct *vma_merge_existing_range( bool expanded; mmap_assert_write_locked(vmg->mm); - VM_WARN_ON(!vma); /* We are modifying a VMA, so caller must specify. */ - VM_WARN_ON(vmg->next); /* We set this. */ - VM_WARN_ON(prev && start <= prev->vm_start); - VM_WARN_ON(start >= end); + VM_WARN_ON_VMG(!vma, vmg); /* We are modifying a VMA, so caller must specify. */ + VM_WARN_ON_VMG(vmg->next, vmg); /* We set this. */ + VM_WARN_ON_VMG(prev && start <= prev->vm_start, vmg); + VM_WARN_ON_VMG(start >= end, vmg); + /* * If vma == prev, then we are offset into a VMA. Otherwise, if we are * not, we must span a portion of the VMA. */ - VM_WARN_ON(vma && ((vma != prev && vmg->start != vma->vm_start) || - vmg->end > vma->vm_end)); + VM_WARN_ON_VMG(vma && ((vma != prev && vmg->start != vma->vm_start) || + vmg->end > vma->vm_end), vmg); /* The vmi must be positioned within vmg->vma. */ - VM_WARN_ON(vma && !(vma_iter_addr(vmg->vmi) >= vma->vm_start && - vma_iter_addr(vmg->vmi) < vma->vm_end)); + VM_WARN_ON_VMG(vma && !(vma_iter_addr(vmg->vmi) >= vma->vm_start && + vma_iter_addr(vmg->vmi) < vma->vm_end), vmg); vmg->state = VMA_MERGE_NOMERGE; @@ -855,9 +856,9 @@ static __must_check struct vm_area_struct *vma_merge_existing_range( pgoff_t pglen = PHYS_PFN(vmg->end - vmg->start); - VM_WARN_ON(!merge_right); + VM_WARN_ON_VMG(!merge_right, vmg); /* If we are offset into a VMA, then prev must be vma. */ - VM_WARN_ON(vmg->start > vma->vm_start && prev && vma != prev); + VM_WARN_ON_VMG(vmg->start > vma->vm_start && prev && vma != prev, vmg); if (merge_will_delete_vma) { vmg->vma = next; @@ -969,9 +970,9 @@ struct vm_area_struct *vma_merge_new_range(struct vma_merge_struct *vmg) bool just_expand = vmg->merge_flags & VMG_FLAG_JUST_EXPAND; mmap_assert_write_locked(vmg->mm); - VM_WARN_ON(vmg->vma); + VM_WARN_ON_VMG(vmg->vma, vmg); /* vmi must point at or before the gap. */ - VM_WARN_ON(vma_iter_addr(vmg->vmi) > end); + VM_WARN_ON_VMG(vma_iter_addr(vmg->vmi) > end, vmg); vmg->state = VMA_MERGE_NOMERGE; @@ -1053,7 +1054,7 @@ int vma_expand(struct vma_merge_struct *vmg) remove_next = true; /* This should already have been checked by this point. */ - VM_WARN_ON(!can_merge_remove_vma(next)); + VM_WARN_ON_VMG(!can_merge_remove_vma(next), vmg); vma_start_write(next); ret = dup_anon_vma(vma, next, &anon_dup); if (ret) @@ -1061,10 +1062,10 @@ int vma_expand(struct vma_merge_struct *vmg) } /* Not merging but overwriting any part of next is not handled. */ - VM_WARN_ON(next && !remove_next && - next != vma && vmg->end > next->vm_start); + VM_WARN_ON_VMG(next && !remove_next && + next != vma && vmg->end > next->vm_start, vmg); /* Only handles expanding */ - VM_WARN_ON(vma->vm_start < vmg->start || vma->vm_end > vmg->end); + VM_WARN_ON_VMG(vma->vm_start < vmg->start || vma->vm_end > vmg->end, vmg); if (commit_merge(vmg, NULL, remove_next ? next : NULL, NULL, 0, true)) goto nomem;