Message ID | 20230714195551.894800-5-Liam.Howlett@oracle.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 D3B12EB64DC for <linux-mm@archiver.kernel.org>; Fri, 14 Jul 2023 19:56:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4751F8D0002; Fri, 14 Jul 2023 15:56:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44CDD6B0075; Fri, 14 Jul 2023 15:56:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 277218D0002; Fri, 14 Jul 2023 15:56:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 16C6F6B0074 for <linux-mm@kvack.org>; Fri, 14 Jul 2023 15:56:14 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id DD5D3A02B8 for <linux-mm@kvack.org>; Fri, 14 Jul 2023 19:56:13 +0000 (UTC) X-FDA: 81011273826.29.5C9439E Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by imf28.hostedemail.com (Postfix) with ESMTP id 73B6EC0017 for <linux-mm@kvack.org>; Fri, 14 Jul 2023 19:56:10 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=X6DynruP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UqFnZywd; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.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=none) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689364570; 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=Y2GhaCMP5kuOs0i8TR/0PGWaib2EC6bHHD4EtCt0MLI=; b=O/IDvGUZ0FS4xEw/QlkOLQAkS3plZV5MFMh1jP1wz6tLdcM33OZ5ANeel4otpw8ZPZ0VrK tbJ03Bm4M2mrFo4OK5d659FDSV83i24GvXgBmTV7MOtsQVPVKY9zf1D8mufKMParw8wIGd U8oA6BuyemHYlDikAZv0cHKEoz8mo0M= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1689364570; a=rsa-sha256; cv=pass; b=ostYXzikMRpllMb15aqbjZSmtvQS8aEguGVE7/njEfi4E1EIaXtcw3LtOmoyJzTv/wSlGM W9R5XHobZFdeLu/5jA9zxhgYqxghC69DDFiYmtKe496jwyhBRIeIhDdoFTTHCBbmjrbzR0 r6wyLG+g2GpVYk94ztjv7lBpXGGe9o4= ARC-Authentication-Results: i=2; imf28.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=X6DynruP; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=UqFnZywd; arc=pass ("microsoft.com:s=arcselector9901:i=1"); spf=pass (imf28.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=none) header.from=oracle.com 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 36EDQoRY019492; Fri, 14 Jul 2023 19:56:09 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-03-30; bh=Y2GhaCMP5kuOs0i8TR/0PGWaib2EC6bHHD4EtCt0MLI=; b=X6DynruP8gXJhzkUv4keOOpzeWe+yU3mVy4W9U+WDeA74DUCsDgRG+A48HkOwTToD+DP bzDUIOeYp9Pcn0c0vVcPpcNpYWdr0M5fXcQxdB39vJ6J0Wl1i+CnszGsMeyyrkEjYsKq +pEVIH7j1Va5paESKUwf58wY8dypZ4ADKAotYL4lkeguORfcJtAGuIRe2TSvkTXlrnrh TdIrw3gLJ9MUVPKPwwvOWMNbvs/lPQBw24RFxPyAejvyiZBBxqcnLMvcI/tH1/BE1dEc ixyzDhaRLNUy7nLWwZT9OZbVCrFkUpgT1VXXbaw8E9cCYWVMDc4p1y6MYtCEHG6B4nel YQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rtq8at7qe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jul 2023 19:56:09 +0000 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 36EI0PpZ027115; Fri, 14 Jul 2023 19:56:07 GMT Received: from nam02-dm3-obe.outbound.protection.outlook.com (mail-dm3nam02lp2049.outbound.protection.outlook.com [104.47.56.49]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rtpvydhdb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Jul 2023 19:56:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=grJw92d9VliZuqt9TPephDdkeHHKY5hu7ilXQxbwAZvFDSeF+zchqMd94YROrxCKxRxRxQfk0QM6Nb5xJdyFxRKUygBMaJonl3hTNdBgS2vWvILhiY/9lQ7XAJ9NWpmx5BTMG80VAU7pmDNJAJURZap7dsWPRIB0XllgtBA0YBlRAGdWUza2DzKb7tEAHhSMuhjqeDxkN46fki9rNljmZyOrBrzRRew0Vc+gxcPHH4HVgDVrXzfchnlECny7k3AeRRO9BhWfPM5GWFuB9kc2iI8aJE/PBqPtCX5JxGwzV/QKM3ADZ3KpD0IXwhwo/15nAEaox/X2aUZQT9N8yQvRNQ== 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=Y2GhaCMP5kuOs0i8TR/0PGWaib2EC6bHHD4EtCt0MLI=; b=Mrh6Oab+kSZ/1hAhQFokKsIh563qUQfRISm8mCJQvXvfSZUzQLh98d+ByO17wMe1dhwO4LdRAx6hq+r2S69TSW4w1XcjhwHl2a/lLzRbcOBBNnL2WM4FryYUkjzWTTc/ZuV9KYRS0kAKXAa+4/69lMaBhNIr1/atqNyaVlCOAsH75aXp7/YuXmiMRe3SAkfwSL0Z3Tg6X2PiOBCLe83nZb1RbrdL/AsU+eBb5EDq3AZjUCYWNdS9vFSn6iLdOjTmmUbwM+vEmUzE1TbyzMcA6o+mXfqPF28pH9yhfXmcgzlmHl84nRD1MqC6V87ZOxgwWA/L1dHPNdgdoK6nBmKMBA== 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=Y2GhaCMP5kuOs0i8TR/0PGWaib2EC6bHHD4EtCt0MLI=; b=UqFnZywdxdgHTjobinkDhY+9AMNrdmrBIEFbnm6U5h47vz5oOmUOcdaQLlnrmWghsHHG0+VQvQ53DRnBaZpiwSPFVkD/RVBkBAbd9mXTe1hOZfbP7uQlK38sDdSIlVUhweddNIsK/xn/xA6fttku7R8jw4YWXjdpgpAsEDi6cyI= Received: from SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) by DM4PR10MB6864.namprd10.prod.outlook.com (2603:10b6:8:103::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.39; Fri, 14 Jul 2023 19:56:05 +0000 Received: from SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c370:eff7:9ddc:f188]) by SN6PR10MB3022.namprd10.prod.outlook.com ([fe80::c370:eff7:9ddc:f188%4]) with mapi id 15.20.6588.027; Fri, 14 Jul 2023 19:56:05 +0000 From: "Liam R. Howlett" <Liam.Howlett@oracle.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>, "Liam R. Howlett" <Liam.Howlett@oracle.com> Subject: [PATCH v2 4/4] maple_tree: Be more strict about locking Date: Fri, 14 Jul 2023 15:55:51 -0400 Message-Id: <20230714195551.894800-5-Liam.Howlett@oracle.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230714195551.894800-1-Liam.Howlett@oracle.com> References: <20230714195551.894800-1-Liam.Howlett@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MN2PR14CA0014.namprd14.prod.outlook.com (2603:10b6:208:23e::19) To SN6PR10MB3022.namprd10.prod.outlook.com (2603:10b6:805:d8::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN6PR10MB3022:EE_|DM4PR10MB6864:EE_ X-MS-Office365-Filtering-Correlation-Id: 93719744-b80f-4313-2f82-08db84a45bdb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TJgPCEIeHwZOy3uYJfncp2WuCbTRJCJzlvLYEqvngRQrun97EotQ0PyedYrHDTiQHRMBEXC1u7OexydQRgvlitSUJXv9lyEvf+7r7jtGU5O6H3QMC54Usq06OkoeoPQEVNdnmqd8gCrCc17+xWe0UztiVXapiTfXLvPZNcEtUTF9hNWGQ7x5t/DQzzSKVWlvZQRIV+oH1oPjXssRKPG6uwVTYEAOV071o2mFkfo/eVdk6DF9xPtjn60rQuJYBmrS4glOXUueT68NG/JtuSsGSPpduQlUD/rJy6s+diXiQK/gB1c+hvFYxv5uk9dVhPlEP91x3IEaF2luwaV74iewXcicSqsH9U+cF6XIVAOg3hr1gaN9zvg0zFMxJrBS7eeV07VE6VUF1I1SuWHDfqETtN6jbGJVxyZW/xkVi6zm5fnBhSDa88LbV5XH3jheJaPxZkJPr82DA5xV/CyCv3W2qjWg7azeTDG6rrZ/EVG9Nb0wYXH3P3tnL3+J0MWV3bXO8Yk7jLmIzjGwDkSLR4MDg8Ay25T4G8Uf3DcmIDWTaliW3kRlwldjFPMYYR/3Mz07 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:(13230028)(136003)(39860400002)(346002)(376002)(366004)(396003)(451199021)(316002)(5660300002)(41300700001)(38100700002)(8936002)(8676002)(86362001)(36756003)(2906002)(6486002)(6666004)(107886003)(6512007)(478600001)(2616005)(83380400001)(186003)(26005)(1076003)(6506007)(66556008)(66476007)(66946007)(6916009)(4326008)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p6g2teEw4fTeJGsvo384M85wzf6tQqooYMCn2admz0n6Y7wOoDe+dNpVi9VBt0KuDH/LMKG4EYbp0onQ3hOTwIUQy7XqpAo3ybokXw8bK8WCZBDXVdHC0U3xjqIR7zlw8GP2iB8uymG5j4peDiSe81EoclJapZmzT4TSXvnG7wAVD9G/kb0UT6fz5KUzj/A4AUwzruWODcN6xJnRnUa7qdS88PMj0y9GlfqS3e2b8kCEdy2uASWT52KJvsmfOaaUzce3TFYQ1J0v3JQASReIX4QASuxV0EFxcFE2CWJkUb5IuBoz8C7Ha27INm1e/vTvFG/ElJBC8CqwpcJsTYEFTh4UVWbEkjDrLUevL275WkClLj/ZtHYISRtOeaBUtgVcCzc9agigREoSqGjAKbAcnCHRyvRwrb7CDAm6t6BJq+4r9JV0U4uPjbfFgpDp+bjMwKYdN4HKXlgrfqrY9Dri4hDqERXVeyqS7d4hiJ39PYOb4PsdAXgkf8In5YuA/7BOyXjCzkoRCgQGOYa4VBEI2NurEyn1lvvKmUe2bNxdOaw5IPkPikYMRYYPb2NgA7NuJMxVdZ27IBJHwlvR1zgpcHFjqK7iI2QF/ahrsK8VbbMLaS6khKxqEwZs3J4Q/G26qci4O8NQcvFsu33JzGneE/v2+dJgZLyKQr2uhF141Zb6veQJBQ3r97DYP6+bAvyEeVcj4DOlMA+ig3VVrJaHill+nIW5FX3RlQMnwzPjPRC9O51wvZn7ZpoHfIJ4XuphaujixXeyyHqkkqJxOkw7z8XRkUvTPTLEP9P9+tkCiGzPlcOl/N7Hh0hR4QRs71OIrJa5No4ec4WBC4AyTsldKxWSejBLMDXvrttzGzWiwl0GToxZYGDI8xjf1srXIeNEteSRUtUztKYT4YfwNXZEXQITLmFZjYbEVq/4qrfapinwbsXDCEgIwbaIACx+89b4/Ny3ehSZ5g452GOA0dYgIWwOCVVMgw1OpQYBdFf1TrUfm8JSeI2RCW78gjXH4IhRnIc+RY5h3lt5PBdz/5QJ2Zvm7lSNEIvZlppywqzEcNx6PK3FfbkeTe6UoCiY0CT6535+MEGrsz+I/eHgdjL+GQh6XJaESJXGwu4zgwcexi9fvnrxYBvC9rmnJDOvcpbPFmn6Qrd48DFtvvBG3rbtBqQ83ai0DVHgencTEVDmbC4+K9CySnxrEcb3hJ5xcdnR5LE+C7IZFUs+PMI8qFFKlVowAjncipPLOh1wiO/MAYkqfiCVYHB2hK4eoZbb+yqEQEO16ZDTk0GKJwQw02YvdYRFZh0dgCV50l2l7rbHNzbYBFQD5lUjFhWTP0aATzYMLu2nb6Z9xCCJEfOAR/IpiLRGoHxcFQ3vCYorkRf57NuXKco9FR2LBFxkQ8r8Oq9/JWYMf2yo0oJN8tZK7he3kCkiTjUz6Vq7W2lDxM1csGm8LlIvlTdw/K+wrqcd5Ty9NXILuHdinhMcoVORZDYJ/FsgiHToY7JRKrneo210njdYe7+YHXff2wHdOJlNSg082A+abfI4A65ctVaSRregKnDm6XYBJ1YujZMXNQHfXooTkz1wPBOHBHFiBkqqoHi/BdmOStTzK/Jk0MCDWYYzFg== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: CU0mdSjjuQm7fjAVTpCutQvWRjH9b1+OvjLQ4MF/Fsteck/lZFHbTE2cJFizoyNENAYEP3+mtLDt6Fb7VWOwaXwVdp+//9DCJLnKYb6Mb/LKi2jOGLYokrcsMz88pvv9trL0nxTc5KVKV0YnYLK+hvsWEzTQ83UxO1hAUH3HqWkRgu9tD3022eNrxCvcGsOnOrAzWu2LXCModM4nqKRymr+NG751l19rB/6wiERPGjST8nYjlOt9ZkmGikgsIRJ1XrPqnvaUfJg9YhR4k95j9ApmMdXJPJ8p6utvSp5GZrox3gYrVdQaTdrynsKUXtPBE3EI0uEUqYU7kBtr2TxiyVGnv5NkZ3gGrYHZ/qly2ZkYdYbUW6yAHyNXjJl6V6s+upA5v9MK0I7ow5kftG16/nARM7QoAqxTw9qbAbPwbB1CNi/dKRLSoyPdb2TAHowJlwUt1CrO2I8rQtByB1U869tEDMKq3+qQ1PBrsfu/lHSdY6QyCIna6jkrLMqtnRxj5V4MvKeebaeTi8rSYfCfkF0qgP63chRdxSgPeurLVNvuQCa/X6F/+1kNvmuD28Z962r+N0Cf5NSGXF2lJjzpDQ0R4t6fcVOhk3bgsPtou00ovhE1gjLAwgH4ar8G+hvAhYcbhqZyPZMNvTEaWbUeepEkFP5prVd2r2LN1y5cICcRiBBTHkO2m74XUrDPJTB+VQaeWJJB6BtZ+/H2AfE8HdSTs1XkLoDHTrHAWtIKPjeUb19PjoyfmN1125xAGwy4dXKoSULGbkSmmd7ZmTuzREqvn3AEHueVQ5g8SnlwSTqaOR9DiZqIR4nH+2iTtJwbi/0KUPSxIH9GoXaoCWNBAHezhKxAGjh6Escj/WOsoeZRESCqMmOgfnlzUQB3e8IUfhKqJETOZcIF2gVCelXf7g== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 93719744-b80f-4313-2f82-08db84a45bdb X-MS-Exchange-CrossTenant-AuthSource: SN6PR10MB3022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2023 19:56:05.4939 (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: Unmj57IakXWo8WR8HnnEuqWyT2BhL84t79QMRPWkey20hGmNhmlEDhEHs5ahINTablveZukDH51LnvOzKeLXUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6864 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-14_10,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307140182 X-Proofpoint-GUID: aC_tBsQ-9dqElXJz315IV1zK3u9YpN4Z X-Proofpoint-ORIG-GUID: aC_tBsQ-9dqElXJz315IV1zK3u9YpN4Z X-Stat-Signature: xz4ucf7w6exau86pboborisndt1g4qch X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 73B6EC0017 X-Rspam-User: X-HE-Tag: 1689364570-923573 X-HE-Meta: U2FsdGVkX1+XrF5eHMIrvJHLj55PzC2VWhsrrg3wZSzhZJIqQq9xzzPKL+zNl8qdPkOJ/d9QzyzSnQ1pmOeQsAIUrF/8OOg8DTZAnv14q1loBXeZ20yRaWKfa844XbUbj2vqqGHbD+iTt0j78hmboLHyF/8IAbEcbUCoFhIInqm+GxX6NPESuxJzQE4NelZTKN3+8WHlbU+uMmRMISQi/MsYou5l9nXKL36PMPNF7B4NKLfFb4QpsXzKkopEYN++Trz8Vn307h2KhOKZtS0mrGL0xxoASBUUqCV2N5wK2cPOTqO3TvfNBOsx0iOjspqUUCS8eHlbNtDOtSnSzRZp2W6c2HIWeUDa5+SigscMuQVWBi8ggq1incEAD3znKF19c5LvzcNNmo3iU/L5lV8SH5U2E0agrkOy3WmAZXC3GcC70/X8yg40UknRTMeItW5z1nxSCxU7gvY0r7eiJqi4g5SY2hjv3yYxs+0MIkL1oQ+bme6K9l+riQaM+Q8ah0wxoxyPqxygo/byxyPjJe5cVJztsmzuzARWDXF5nrC34c8uolGKYc6lP+1Sm/lg2uz0g9lotGsrUKkSUq2VGUIeQIvA2J0s1qCv7qb71ACr+fJKxlX8/CdX4jECvb90/N7GNLkgiUjB7i2CV/sivShCvb8roySN4oCwFOrz6Pd8t0APMejIg/WSCmx9J9PjMy8bwXm6xZsIOOk6hINNl5ax6TY0SYAj+57tZ2hcS0R1qVcXhWPXREYuOXc7V2+jYWDfkDQfeXHIbTNQjY3cn5/nue0ucfZpogQXFX2MXxClP7vnp8u8AdIuw/DivAu0BuMGn75eA4+Axp5H4dODRet4GZnOJ+QnrjTJMW4qOLxE1aAjxQtC6SUIpoQT4b2iEY2ae0xorRFDNWiKFjTNN4tuCqLxkhDzgmoAyPBs4qbwRUUyB/SVYVlXaB69rVQ5dg4p28Z4ZrDv/i77YzFDZPG GCIdQzar azCREYtpqp8TGrkW7izP/OoGr7VzEXlqnywyMVJkOY0+IGdMp7LYArblOZidKpQYUYhU8MKPyJUOy6sjRxBkOKLgScpNBefRmEDlg+5otMvfJyzP5coMLP4qmTJmhHtt5jKJoEu9F4waeX7zJk+uPRS4iH9iNKet93GNMWH35SqFwSyxrGDtKxqEofCEj4yCVWhFNi8mh0PDE2Xlamlk8gr6kU8fkbBNSFRKtrHhNlfUZSsmqq4vh5bTPNGGtwaAwsJKM+M6ZdwQnu+vLJCsokJfy3CmVCh3zDY15PT3l7gubuT/PKVi05UVDUU6j/xpFNqnotCU30p93qiSbqpmtn+vTeqT1d23x1SQgZ2LgZU8j8bxVZUYv5sRbyQIL4ma5i7W+6beFn+AA3uIeTMXiqZ3xWfYm13ObaGpCsxRvokTejkUGbgjOxv1zQ3GgwSzKkZk6KzkJUs6ZtCEF054vDWti9isD7ok0csmPv7EfewcTGlPBe4INizohxK6CllDO2ekI 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: <linux-mm.kvack.org> |
Series |
More strict maple tree lockdep
|
expand
|
diff --git a/include/linux/maple_tree.h b/include/linux/maple_tree.h index 6618c1512886..43f18230cfa4 100644 --- a/include/linux/maple_tree.h +++ b/include/linux/maple_tree.h @@ -185,11 +185,16 @@ typedef struct lockdep_map *lockdep_map_p; #define mt_lock_is_held(mt) \ (!(mt)->ma_external_lock || lock_is_held((mt)->ma_external_lock)) +#define mt_write_lock_is_held(mt) \ + (!(mt)->ma_external_lock || \ + lock_is_held_type((mt)->ma_external_lock, 0)) + #define mt_set_external_lock(mt, lock) \ (mt)->ma_external_lock = &(lock)->dep_map #else typedef struct { /* nothing */ } lockdep_map_p; -#define mt_lock_is_held(mt) 1 +#define mt_lock_is_held(mt) 1 +#define mt_write_lock_is_held(mt) 1 #define mt_set_external_lock(mt, lock) do { } while (0) #endif diff --git a/lib/maple_tree.c b/lib/maple_tree.c index cef47ce8eddd..722c78077b25 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -777,6 +777,12 @@ static inline void __rcu **ma_slots(struct maple_node *mn, enum maple_type mt) } } +static inline bool mt_write_locked(const struct maple_tree *mt) +{ + return mt_external_lock(mt) ? mt_write_lock_is_held(mt) : + lockdep_is_held(&mt->ma_lock); +} + static inline bool mt_locked(const struct maple_tree *mt) { return mt_external_lock(mt) ? mt_lock_is_held(mt) : @@ -792,7 +798,7 @@ static inline void *mt_slot(const struct maple_tree *mt, static inline void *mt_slot_locked(struct maple_tree *mt, void __rcu **slots, unsigned char offset) { - return rcu_dereference_protected(slots[offset], mt_locked(mt)); + return rcu_dereference_protected(slots[offset], mt_write_locked(mt)); } /* * mas_slot_locked() - Get the slot value when holding the maple tree lock. @@ -835,7 +841,7 @@ static inline void *mas_root(struct ma_state *mas) static inline void *mt_root_locked(struct maple_tree *mt) { - return rcu_dereference_protected(mt->ma_root, mt_locked(mt)); + return rcu_dereference_protected(mt->ma_root, mt_write_locked(mt)); } /*
Use lockdep to check the write path in the maple tree holds the lock in write mode. Introduce mt_write_lock_is_held() to check if the lock is held for writing. Update the necessary checks for rcu_dereference_protected() to use the new write lock check. Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> --- include/linux/maple_tree.h | 7 ++++++- lib/maple_tree.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-)