Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1876212rwb; Wed, 26 Jul 2023 21:36:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlExQdQIlnrklAZSW4Gkl1q+V4GVFy/q9uGQK08K9bYiySPjirQ6f+skoaMsxywpvW70uBKs X-Received: by 2002:a17:90a:4483:b0:268:f2e:b478 with SMTP id t3-20020a17090a448300b002680f2eb478mr2934220pjg.3.1690432576815; Wed, 26 Jul 2023 21:36:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690432576; cv=pass; d=google.com; s=arc-20160816; b=fH3q+LdxQzEtitGjkhz+fWrT7MHqLWamY4a3tRtSSVRWAtKJiVTzNDyTSCZvfwlrqd NjwjECeEcwH31Qe3umkCcdf3sGpicG71F2zDndE5MG+MTKSBjgtZjzL/D/0BexL0yG0v RY+EQTZaZpIMS6QSw5UpvNEkClLi7D8yXzv0tK3BWbUSDkQc2zkNx7BDmoY1mEU1yIKK sepZMvLtTcvKIDIb0nNpns9p/+7AMp+JrSnciTN7h79y0aEhSBYf4D2Ko4TZJbiadXc2 RjDjKEWrB14yI4jNuqSlWF/CB1prgcqsqjlEFCE5wTX1xhvJN5A5Tf5g843hXvNKVV70 Z7yQ== 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:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=jVtjMf4+aWJZpy259O2cHcLny78jNALAK87LgRatGD8=; fh=DJpE0rrucHelU5El6drELH/NqsCqHzLY3Ny9H4/s4mU=; b=CpjHmnnOC/FrLPwtd0fwG0GNz8JERuUrCzB+CsOXn5H5CFJqrcocF7T5sMjaH2C3Bs q+CSxiw/PJpDh2ZmSvPc1IPeA1vgwgGG1hRlsg+LkihdJ7kkVNG6zJaCJ7O60J7aVM6h QOZ0M9DmlSxQMxjtXHHp5c/oTqNhtW0eY7Xe5+mzIxZxGEI4G9lBpFnObWkvIXMo6hxj iP50GcJBI80DZmRmtf56BICwC5kx3q+waljQaHOHLwSwoHrYcvv+CSUQAQSntVKF8mB3 DdC3haJuFm8mmyrEddxYd83xOXTCsamxfyFfP2yB3jk6Bfbs9uzGkXqChLzmU0Bylegi HGLw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=dUtJWgeF; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HEV51G8K; 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:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020a17090a5a0100b0026830486bdasi623221pjd.118.2023.07.26.21.36.04; Wed, 26 Jul 2023 21:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=dUtJWgeF; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=HEV51G8K; 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231289AbjG0EbW (ORCPT + 99 others); Thu, 27 Jul 2023 00:31:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjG0EbT (ORCPT ); Thu, 27 Jul 2023 00:31:19 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2CD52704; Wed, 26 Jul 2023 21:31:17 -0700 (PDT) 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 36R0uoom016521; Thu, 27 Jul 2023 04:30:59 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-2023-03-30; bh=jVtjMf4+aWJZpy259O2cHcLny78jNALAK87LgRatGD8=; b=dUtJWgeF+u3eDZ4BvQrLCMzNpH4Ect330WFmVWfYVjWKgfqhZvg4Tptgu3dXX2EdmieH spAZFYZw9ReFvaEZ9aCRNxstVUhNZ/7oCt/I+xLk7er7Noae5IlTgl6H749CJ4QjBZkN bkS9si2yURF/oLrjl310nk+q6YLH5JRsDLy6MNuLm6FI6aoeWdK12hE9cZYeKukNRYMx kMer66CLBboFMhZ/7aFMDJjYr+qfP5IHDppHf6Hxx7BAsco/UVRakX9H3+fnTMBrvAY4 f24HGthGTPalk6IgH6jDQNh0ECFHMUHHGNb1U6Z3l4qCj03b2hD1pMLrCocTR6qAUEVb xw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s070b0udm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2023 04:30:58 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36R1Ve5Q030414; Thu, 27 Jul 2023 04:30:57 GMT Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3s05jddf2d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2023 04:30:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n/3yu1S1ilJUgl/VcD6thkXT+NXwpZKWHwL9ZfVJH2JjNePsRd9AGaUIF74e6PE3MyHw/kGb9iYYi7lsmKhnx8hf7rGVnJ8Ns6N8LQ2JrKancwWcKdEFODoHcvekAmOtMIvea+5xlA8u/k+BddW3Cxn83OKX8TShDtoLny+K3HkBxy91ywqu9J4ctSVFPd076UdbolyfCmXQ1jDFvSikV4H9//SaStshMmTyGn+JPnqrhiGmFuC3l5fEA71PID6aMcovYwo8SO0aYNKbaqzQMfKYRhgOm+eKmU0gB6TpaGijW96pncRoyHJ5WsI27XqEK8xS2CXnDCFMw/z/EUr+dg== 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=jVtjMf4+aWJZpy259O2cHcLny78jNALAK87LgRatGD8=; b=a0Eh+f9LTmQICY8MZiw9uZ1zbKpNGWFb7NNKCx2eM21S+2DQnDWK3Kii8cI8Cr7WU4f9TOoSZOHu08tzDGD2oWXvDZKZWDsWGIFYYpCiBISj51yg+FwFvUT9s88AUkRhjrRnAjW4XFNS3ZYlOP3poLjn+p/YiIDynX4LPIjV2+tsL5AaS2BVit/o1SwoeALZHZXfKQS+jBEYriMi1IZkUjO8AsLc80vP4Z34tQopX4FeYlc5n8EH0TKixeagCrcKf77vfqmqY4S9M7/1yK5mzJkFKqlWMqyz7DJMuvdlTV/H0JThKFZO930KEcu1+N2zqgqv3FGl+fp4/FLV4EdjDw== 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=jVtjMf4+aWJZpy259O2cHcLny78jNALAK87LgRatGD8=; b=HEV51G8KjiHHJHCAJ8YPqkVwDZOUHzSTYfLclVPTEFvv+J0+fvbVrzGvZQtmwuWFj5H4HM4WGHnwrtv6CiuiK1AgbP7s5I8fI1SXLZLJExmfY0TiEI0b5sAi5N/1HBIugTwTReeru2AVhV6jgV6Cx+xxyArxpTLUZdn6WH2awnA= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by SA2PR10MB4730.namprd10.prod.outlook.com (2603:10b6:806:117::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.29; Thu, 27 Jul 2023 04:30:54 +0000 Received: from CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::2472:7089:2be3:802c]) by CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::2472:7089:2be3:802c%3]) with mapi id 15.20.6631.026; Thu, 27 Jul 2023 04:30:53 +0000 Message-ID: <3505769d-9e7a-e76d-3aa7-286d689345b6@oracle.com> Date: Thu, 27 Jul 2023 14:30:42 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2] kernfs: dont take i_lock on inode attr read To: Ian Kent , Anders Roxell Cc: Arnd Bergmann , Tejun Heo , Greg Kroah-Hartman , Minchan Kim , Eric Sandeen , Alexander Viro , Rick Lindsley , David Howells , Miklos Szeredi , Carlos Maiolino , linux-fsdevel , Kernel Mailing List , elver@google.com References: <166606025456.13363.3829702374064563472.stgit@donald.themaw.net> <166606036215.13363.1288735296954908554.stgit@donald.themaw.net> <20221221133428.GE69385@mutt> <7815c8da-7d5f-c2c5-9dfd-7a77ac37c7f7@themaw.net> <9e35cf66-79ef-1f13-dc6b-b013c73a9fc6@themaw.net> <20230718190009.GC411@mutt> <76fcd1fe-b5f5-dd6b-c74d-30c2300f3963@themaw.net> <15eddad0-e73b-2686-b5ba-eaacc57b8947@themaw.net> Content-Language: en-US From: Imran Khan In-Reply-To: <15eddad0-e73b-2686-b5ba-eaacc57b8947@themaw.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SN6PR05CA0025.namprd05.prod.outlook.com (2603:10b6:805:de::38) To CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4468:EE_|SA2PR10MB4730:EE_ X-MS-Office365-Filtering-Correlation-Id: a5e17fd4-f840-428a-2167-08db8e5a4358 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MsdgcJbFfS44UYjxsTfAwKGEKsm8LKLPsVSGXOkIgAsbj9twMFal7gi8q7x9+Yhmp9YZo1zrIuF6x/PArNrcB5H5IxhlnIGcBfa+gaDTP1F5J9OlMZ5kCnuwhWDZVtmptrsnXbTEmiHLQUim43DXSatZsw2FE7T60urpLz7DbAyWO/Wl181DMDtr+Ys2bamMI3lFJJIdzw8f+sXhT7dZ4O08znpxonDujV8Cx/rIOEOcD5gspXdQ3tVDEK5Zcsx0/cyKZo40MSIB14JJWQCzUfHHJDtxE6ZIml2/e+4kxT85+pblPX0tg4JyfKK7PiPWDDBWGcM+y4i11mqOEKbtcZMcs9A+e+wQPyCrjx74k1/VGh/C9dk5wAxamUcBI8hCprJoWLDkbTqp08vx+FA+4836chp2N85ed571Y0MAihqt7VNyYPASK2SFNn7zeDqosIR7GQva7YzasPVdj2a3nX5phsYwgnrk2XNos1lGR8nNmADP/5YluAGgbi24zn3jbsnj5pRizdEVb9ZTKPeEXwl2z4n42CH93P7x1cNgAYasp3cHfL/Fp8jWHuejJ+soRlrmLns3zMCn2FTbK/fPITn5Ed+A5pWnGQiJ95fU7O4NY9R24S9hOvsDbW4nQiq3LbqIZmFND070TEqjB3C44i9gccvV2vwL6t65lYgfvYggqBmMV+d2XByBG5vpntWN X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4468.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(396003)(136003)(346002)(366004)(39860400002)(451199021)(31696002)(86362001)(186003)(6506007)(26005)(4326008)(66946007)(66476007)(66556008)(53546011)(6512007)(83380400001)(2616005)(31686004)(36756003)(2906002)(6486002)(66899021)(478600001)(110136005)(54906003)(6666004)(41300700001)(38100700002)(316002)(7416002)(8936002)(8676002)(5660300002)(192303002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UW54MGM1SkxYTjVxdUI5R2REcGdxWWR0cGpFcXExdlN4bks1WWJITXZteXM5?= =?utf-8?B?QU1pRmx5TXFoZ1RrSjE1dnVFcG4zR3JBd0xISVdqRklaVUVQN1hrSklUOFMz?= =?utf-8?B?cThCcy9TVU1J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zUlJPdkRrR24r?= =?utf-8?B?QWFEd3huKzNwdG43QUNCUHl2b0p5Wi9KUmhneTUyMG5JVkRzd1F0NW1iUFVU?= =?utf-8?B?Tlk5TnVvbTc2RWhpckJPd1hWWEZtZlJGQUgwTVlRYzFabG5jZ3VWSkRlOUE1?= =?utf-8?B?ZlBoUT09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5e17fd4-f840-428a-2167-08db8e5a4358 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4468.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 04:30:53.3496 (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: FkZrK8+RSD23NEZo0LkzGAbu+SQHXS8VtBYarsmDTwrf9Y/oLd4b2lWnqzxL8uFEEc9sIIP1LBr83We5CaPtfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR10MB4730 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-26_08,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 spamscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307270040 X-Proofpoint-GUID: gy3kJRgwFeB4AHZASOBGTkVGtyMdKzb2 X-Proofpoint-ORIG-GUID: gy3kJRgwFeB4AHZASOBGTkVGtyMdKzb2 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hello Ian, Sorry for late reply. I was about to reply this week. On 27/7/2023 10:38 am, Ian Kent wrote: > On 20/7/23 10:03, Ian Kent wrote: >> On Wed, 2023-07-19 at 12:23 +0800, Ian Kent wrote: [...] >> I do see a problem with recent changes. >> >> I'll send this off to Greg after I've done some testing (primarily just >> compile and function). >> >> Here's a patch which describes what I found. >> >> Comments are, of course, welcome, ;) > > Anders I was hoping you would check if/what lockdep trace > > you get with this patch. > > > Imran, I was hoping you would comment on my change as it > > relates to the kernfs_iattr_rwsem changes. > > > Ian > >> >> kernfs: fix missing kernfs_iattr_rwsem locking >> >> From: Ian Kent >> >> When the kernfs_iattr_rwsem was introduced a case was missed. >> >> The update of the kernfs directory node child count was also protected >> by the kernfs_rwsem and needs to be included in the change so that the >> child count (and so the inode n_link attribute) does not change while >> holding the rwsem for read. >> kernfs direcytory node's child count changes in kernfs_(un)link_sibling and these are getting invoked while adding (kernfs_add_one), removing(__kernfs_remove) or moving (kernfs_rename_ns)a node. Each of these operations proceed under kernfs_rwsem and I see each invocation of kernfs_link/unlink_sibling during the above mentioned operations is happening under kernfs_rwsem. So the child count should still be protected by kernfs_rwsem and we should not need to acquire kernfs_iattr_rwsem in kernfs_link/unlink_sibling. Kindly let me know your thoughts. I would still like to see new lockdep traces with this change. Thanks, Imran >> Fixes: 9caf696142 (kernfs: Introduce separate rwsem to protect inode >> attributes) >> >> Signed-off-by: Ian Kent >> Cc: Anders Roxell >> Cc: Imran Khan >> Cc: Arnd Bergmann >> Cc: Minchan Kim >> Cc: Eric Sandeen >> --- >>   fs/kernfs/dir.c |    4 ++++ >>   1 file changed, 4 insertions(+) >> >> diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c >> index 45b6919903e6..6e84bb69602e 100644 >> --- a/fs/kernfs/dir.c >> +++ b/fs/kernfs/dir.c >> @@ -383,9 +383,11 @@ static int kernfs_link_sibling(struct kernfs_node >> *kn) >>       rb_insert_color(&kn->rb, &kn->parent->dir.children); >>         /* successfully added, account subdir number */ >> +    down_write(&kernfs_root(kn)->kernfs_iattr_rwsem); >>       if (kernfs_type(kn) == KERNFS_DIR) >>           kn->parent->dir.subdirs++; >>       kernfs_inc_rev(kn->parent); >> +    up_write(&kernfs_root(kn)->kernfs_iattr_rwsem); >>         return 0; >>   } >> @@ -408,9 +410,11 @@ static bool kernfs_unlink_sibling(struct >> kernfs_node *kn) >>       if (RB_EMPTY_NODE(&kn->rb)) >>           return false; >>   +    down_write(&kernfs_root(kn)->kernfs_iattr_rwsem); >>       if (kernfs_type(kn) == KERNFS_DIR) >>           kn->parent->dir.subdirs--; >>       kernfs_inc_rev(kn->parent); >> +    up_write(&kernfs_root(kn)->kernfs_iattr_rwsem); >>         rb_erase(&kn->rb, &kn->parent->dir.children); >>       RB_CLEAR_NODE(&kn->rb); >>