Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp226513iob; Mon, 2 May 2022 17:48:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKPxdhm6VtP31cD4DgLQ9WJMFy/KHF6kCvZtHaEW2tyAw7+5IUU+fFr5UPyl6NidPqvulS X-Received: by 2002:a17:90b:350a:b0:1dc:69bc:e04 with SMTP id ls10-20020a17090b350a00b001dc69bc0e04mr2008238pjb.18.1651538919643; Mon, 02 May 2022 17:48:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651538919; cv=pass; d=google.com; s=arc-20160816; b=tD44OX5pRetowTmtY4TV/uQzchqFZxStbz/bTrHfkSLv5ecgaNofNiKZ9xhtUy6IR+ v6gwdZgrmpqv685wsm2UDBH40dTDfhly3IGuUjyIsoL1G20JlHF1AW7o4SNR7PHVN3cJ m15fQKprsYTlh8RlYXw9MhDdOFrJV2Su3mybXx+GxDECJz0qK2HFyJKg9WNLD/PnZpJh OSsNM1E2xwQaEXZoEFh5UqjJdSewVW8hoQ/9Kr3d8vn35F3zPilhOoP+wCwBRpftAdlu dEslzpXrnIMbWVrBQq6MAXtElnZfTHs8oqaDEnHbOKSzCYgg4RCHGCZFGoqLKXyJCBiM TigQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=UoiiXccgcvoMQsJ7BfeO74ZDqOr/H9g0k0Z5+dd6l8M=; b=ldV/i+1eJHZ90SkdYpuKogQ0Tmw4D4NeW0Q31OJ2bs4cWh4MGTduhUwawIRxEIgOzI F6pKDZdY9jFDXyrMr96vZeRcQ0fd7modi2UgC1Jh9ow7vcQIVygxF7UWCyMpij1QO1f8 9hIomPsDxC6+wfkvgok2YGNkm7HtWkhqBJ6Sv0oirIoDIjxDv5uc8IhSqYjM6DydDsEv Ye+7mR4rUOVGnrrJsuBomkwYtFE9HuRnqSv6R9ElMK2Zr9PXK3lmCMgYOIaPaSt3XPRc LOvJevW1vntHfUfkmyP79hDPLY+eQZLc7jMFYi0FsfkZsix8Z+DpUW1MN93ZmEykw45i /pAQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=aARe6xNv; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ng1jYHJZ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h12-20020a170902f54c00b001590572af7bsi17397058plf.409.2022.05.02.17.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:48:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=aARe6xNv; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ng1jYHJZ; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 601EE4D262; Mon, 2 May 2022 17:37:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381133AbiD2VDM (ORCPT + 99 others); Fri, 29 Apr 2022 17:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235017AbiD2VDK (ORCPT ); Fri, 29 Apr 2022 17:03:10 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E4FED39BF for ; Fri, 29 Apr 2022 13:59:51 -0700 (PDT) Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23TI2XhU032179; Fri, 29 Apr 2022 20:59:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=UoiiXccgcvoMQsJ7BfeO74ZDqOr/H9g0k0Z5+dd6l8M=; b=aARe6xNvwKBAz0febuAsnQ3Hs5DMVsld4tGCk90sq5fjd5/nz//vpu/6NRBrp9M4Et55 HuvmOFseR1811uSyFBpL4XvDF9RgnjioQygJNXP2CXK5Ar9jg3/jzyK14dEt4ssjxbsR DNWq9bygm2NysrI8WlSe3qhmBTUzezGgwq5q539PTyVAxr4psve5aZC4VbpmncKe6fxW g6/KpSNxHBNIdzqGHPI6gxQSG0ARn+byvwlzaDjeymoA+gCF/t8My33yZtos7oAnCJ6R j2OcVNQ91AApEz2ytQuk9yTN8n9iHKmrek+XP7HYI8G/ZJV+oiabBInSyEcjn9jDXk3I Qg== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3fmb1073mg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Apr 2022 20:59:40 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 23TKpFib018451; Fri, 29 Apr 2022 20:59:38 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2103.outbound.protection.outlook.com [104.47.58.103]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fm7w8g8nq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Apr 2022 20:59:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FdWzF3pfCDg1gKwZiKUWaf4/UCZu3fd3nXXkEQE6Z/d7bhBCk7gtHS524JopKniQP9Njb7XF5hwYD7+4COKIXuNTXoiiOKK1ZFmVLXgmM2m6k+j09piEQD1y4zENHirgg8whZEcmPlISbIEN+axWIEnpL0cmgKHUrStdrPriRIOM48VN190A6/lbVt5VqR8Fi0OtR8M3TyZOSqqEP2WX5JiMgBHVRo3Omyps7F77Z6hQcQmoVWRL1Cj7074vBpGZ+J56b4uVwR4JlNhceRaC6NeDFxhfdv1ox+ZUQIHuujvYosmbfLZQb8LyZ1ILUzFuD1Fa1j0lbcitDNeea35tfQ== 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=UoiiXccgcvoMQsJ7BfeO74ZDqOr/H9g0k0Z5+dd6l8M=; b=H083oZb/vzsXURPp38klh86M07+yu+KgcFFSoQs6n4glnva8gqCXlLFcutHcBonWDkhpxuHNzg73NCzbYoH+hq9ElwaNI8dUKjy4K0plU2SZy0UU96DVvH0LJ6aC/jqWTVHIDanfIP+68m6LtCIBDqFGDGJo30FVEaPQn4tSZxT94Pp1Hmlvmz6nJCWvbKca30JG8omS0xJfxMTY7HEHzYRDavazs44nJLw8fjQJloH1w7v4bUWsv7GEPG+BEaPxKCLwaeXbINTDrUb0vtSsFwOPdbfZiqJLRcJaWqF6q46w/069yvcy8no4ms6w1xOw+s3IUZe6zoTzvj7qtipbXA== 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=UoiiXccgcvoMQsJ7BfeO74ZDqOr/H9g0k0Z5+dd6l8M=; b=Ng1jYHJZihPx8Htsszw9/IfhV1l1NsDTMoyF6ZlyPPDKRyV/WMaX/9/OWb4+FxbhxCrBfPpcHS+PGI1iWomQT8Qd2mb65vElNEeeW4KPnr9Dlg0r9/j8qvaIFLfZc/Q3QpbrDRy+zSzOF8dRVQ2s0yvd9J1d1gkt3U7jZ8EBvho= Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by BY5PR10MB3985.namprd10.prod.outlook.com (2603:10b6:a03:1fc::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.13; Fri, 29 Apr 2022 20:59:36 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::9d76:7926:9b76:f461]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::9d76:7926:9b76:f461%7]) with mapi id 15.20.5206.013; Fri, 29 Apr 2022 20:59:36 +0000 Message-ID: <152cb376-3793-0dd3-7d2d-d6197b8e014f@oracle.com> Date: Fri, 29 Apr 2022 13:59:33 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v1] hugetlbfs: fix hugetlbfs_statfs() locking Content-Language: en-US To: Andrew Morton , Mina Almasry Cc: Oscar Salvador , Muchun Song , Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220429202207.3045-1-almasrymina@google.com> <20220429133345.d79af45fb107340c31655c8e@linux-foundation.org> From: Mike Kravetz In-Reply-To: <20220429133345.d79af45fb107340c31655c8e@linux-foundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MW4PR03CA0199.namprd03.prod.outlook.com (2603:10b6:303:b8::24) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 32190f39-a1f0-4b1a-0533-08da2a232b17 X-MS-TrafficTypeDiagnostic: BY5PR10MB3985:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6XWVQm3M6Yn7uN44cUs9IFw3bmEtQi0FKlEF+PDtM83OQmlyxxZFZ8wp3OBLLnDbWh3ZLOodugZuuZMYjIC4wRIibD+BoUV1o2UycCpGpdvQ6NMqU6SHGQxJbOWYAeMf3RuK98WJrYGeNuUzSVZwUgfQ4wzuH0/5BuRHMAvfjfMmppgaMHQTAMtxthNQ4ep+lpefoRlcWLKsmOWUeFvck8bBzHiKrWzpuMnSgg94fzL7bogV14jBLcFl2WAJV+UuLCF0qjTBAD5mSs0H1ECpkoYuA/yO5yIvJueh9Jcp4UfmpopGNkWglTxrJVi1r93gfPuC8eUDAGspH4eoPYA8kR9DZmdaMMt54CHGtyZiSt9s0J1mSD71JnnGhcOBMws/QId08jsG+HuXOdkDLLqf+cKqjZ2AH4XIHvCM47AYdFqDn+dPS8fxoxTKKIn2bMrhPLekU5Km8pOB99szJ1semHYvoCA8+monX7+qpcREnEqsI2dEMm4MnzKgp+iind3ED2Wd06MJa/7ZfxoFGM7muDHPSGlpkYWtwjNnTSVXMPkn310mEy+TWwssUYxRVnYVzKVo6UTULuiIR6l6plJ1jKv7Uch/4v7CUqYKva0cjML0piDLNDN6W+rG3DPRWdasQi5Rvof/7b2ZvnxY+5dAYq0klMsOFZ1iOXEINVNrRseQKCWeRa7dBq1esI0RHmvxaVrEcWcLkGcn0djCMCIwqxgLCW11CU6BJR14fyPFWsC7cDkNn6rMKoXGy2Cu1OUnnT7p7+PYspUksb+wMyxfIw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(86362001)(6486002)(508600001)(52116002)(2616005)(31696002)(26005)(6512007)(6506007)(53546011)(38350700002)(38100700002)(6666004)(66556008)(186003)(66476007)(316002)(2906002)(66946007)(5660300002)(36756003)(44832011)(8936002)(110136005)(31686004)(54906003)(83380400001)(4326008)(8676002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U2c5b05aQ2F5RnFVVGJKUWFSN2NWZVRZYk1zYmRpYllySnNRQ2lBa245ajlI?= =?utf-8?B?M3libkJJL2xVdHZqSnRLSXJ2azY2K3NWTzZ0bHdCaWlnZFUrSFpYR0hVNlZW?= =?utf-8?B?UDhNT01oK3UyRUs0U09CUzUxMmk3L2t5ZHdIRmFlZWs5MEFMZy9mMXI1Y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ZVJ3Z21BMy9ISTM1RHVFRE9MWk5qTERkVmthWHJp?= =?utf-8?B?ZkZqR0hkKzBTb212NlBEYjFkT085dVZYeTYrUndWRUJ2YTFOcTQ4dHdLdlVV?= =?utf-8?B?MFNsb2o5UmYzd3pvdVpHaklISkpNK1BzbkFMdCtjbGJOVDJFTmZSZ0ZFOHpW?= =?utf-8?B?cC9hbEhlbnNIMURzbFJpREJtdVBPUHpvK1czU0lwVHYyZnJGdSt0UklPSnl1?= =?utf-8?B?RnMyb0NaVG1rVys0TDFqaW9aS0pldFZrTHFaaHcwSDBGSlZaVFphOFJ3UHox?= =?utf-8?B?Y2QxSXAwaWVsV1g1MGkwaUtGM1hsbytMNmM1SXpZSy9iZDBWaHdRRGRZSC9G?= =?utf-8?B?cjhZZnR3dTcyb1R4alNMQUltMGFDMjlYU25NM3ZiaHVEZUI0a2tKN2UwL1N5?= =?utf-8?Q?tTgGtT8o0s6/vdH4=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32190f39-a1f0-4b1a-0533-08da2a232b17 X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2022 20:59:36.4465 (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: eUi7/YDmb8rGm6i4is4FJYEDjWGFAXYI9ThUYPqufmPg3MEObwxgSx78mWPmR7jPCDRpSmpbq1dStmQ8bxfxpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR10MB3985 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486,18.0.858 definitions=2022-04-29_07:2022-04-28,2022-04-29 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204290113 X-Proofpoint-ORIG-GUID: nOlo8qVaYjsuL2JqDnsDfvsNtGKB0yrV X-Proofpoint-GUID: nOlo8qVaYjsuL2JqDnsDfvsNtGKB0yrV X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/29/22 13:33, Andrew Morton wrote: > On Fri, 29 Apr 2022 13:22:06 -0700 Mina Almasry wrote: > >> After commit db71ef79b59b ("hugetlb: make free_huge_page irq safe"), >> the subpool lock should be locked with spin_lock_irq() and all call >> sites was modified as such, except for the ones in hugetlbfs_statfs(). >> >> ... >> >> --- a/fs/hugetlbfs/inode.c >> +++ b/fs/hugetlbfs/inode.c >> @@ -1048,12 +1048,12 @@ static int hugetlbfs_statfs(struct dentry *dentry, struct kstatfs *buf) >> if (sbinfo->spool) { >> long free_pages; >> >> - spin_lock(&sbinfo->spool->lock); >> + spin_lock_irq(&sbinfo->spool->lock); >> buf->f_blocks = sbinfo->spool->max_hpages; >> free_pages = sbinfo->spool->max_hpages >> - sbinfo->spool->used_hpages; >> buf->f_bavail = buf->f_bfree = free_pages; >> - spin_unlock(&sbinfo->spool->lock); >> + spin_unlock_irq(&sbinfo->spool->lock); >> buf->f_files = sbinfo->max_inodes; >> buf->f_ffree = sbinfo->free_inodes; >> } > > Looks good. Agree, thanks Mina! Reviewed-by: Mike Kravetz > > This seems to be theoretically deadlockable and less theoretically > lockdep splattable, so I'm inclined to cc:stable on this. > > I wonder why we didn't do that with db71ef79b59bb2e78dc4. > I do not think it was considered because the "less theoretically lockdep splattable" was so rare. IIRC, the issue of possibly freeing hugetlb pages in IRQ context existed from almost the beginning of hugetlb. It was first discovered and 'addressed' with c77c0a8ac4c5. That was not cc:stable. Then it was discovered that c77c0a8ac4c5 was not complete, so db71ef79b59b effectively replaced c77c0a8ac4c5. That also was not cc:stable. I guess we could cc:stable this. Mina, did you find this with lockdep or just code inspection? -- Mike Kravetz