Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp2010958rwb; Thu, 27 Jul 2023 00:08:09 -0700 (PDT) X-Google-Smtp-Source: APBJJlFnKdrYlK3gP6EDk9TJJnNemdlk2VPj4SrQQm5lU+5zfqcfzRP8XGi8mx53nR0Ml3uSkt1h X-Received: by 2002:a17:906:20f:b0:991:e458:d16 with SMTP id 15-20020a170906020f00b00991e4580d16mr1239700ejd.72.1690441689171; Thu, 27 Jul 2023 00:08:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690441689; cv=pass; d=google.com; s=arc-20160816; b=dAYarpg8410kKoTxmGyQVhesrg+ziV08hbymjy2ue3rMLh+k1jmxESiFk/7LP1N7ne iX2Gd9rnVIEBNDKDVx5Dc0zy5yYs/Jp7/PQt8P2gbbJKeoUidibOfFBlXs/KhhznYV2l 0OpEUnonrM5JsHDxVdPe3cZwgfGBALs/90MQpbFp5LzUdM+7LJLGH5Zwf1MFdyyKOhgt cNIx3LRx4sDGVLOCAwrGWrZklPzKucEltW7+sdce7A+6gt9BIdc1gVHFu9HcNYcgwVZ8 ne7x+V0OCZG21eE441EqizgkHCRjMgR6dpqufSy/uPqs1pANjLSg8xNf6v4XznavjU29 3MQw== 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:references:cc:to:from:content-language:subject :user-agent:date:message-id:dkim-signature:dkim-signature; bh=OgpMpNgQI1DLSPfWpkGwPWMj/X8nliJeXNdo+NepQk0=; fh=B85h1XwMg2RtULKK56B4uDN9M+RgrqL83HI+acfTynM=; b=SdIPxe9pMgJrqkoeIKeaUv9cQrtH42HkAcPCKFOm027WE3pd+m1Ah9/FFDfr0/qdQH n9W4Cfo3iJIGVrnLVVlXA4+G4V4ydoz3ZPFJoYlByDS1x17qPTs4mjlsZmlSX9Ttl2FK gFk6gEdM4eOu97GtI0LmVYN+5R/uwI2qe+eRW+TphnIvm6JOf4D1+3F+JlPxiM+2yXhC g7NcTso3gX6q0LWpJJvFDfBoaRAhvj5Ky6DyWzCXQ8CbZJdNZ7kPUUPIKlsgrsc42jSV Dkyribxlz2UEdybv0ncPlXH6Jta+FXbRzDoBdqmfVg/zoSFEZ6PIqfVPRgI4FO3pVkId e15w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=kDJw3PE3; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Lao1az8f; 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 kb10-20020a1709070f8a00b00965cb784a27si571728ejc.699.2023.07.27.00.07.44; Thu, 27 Jul 2023 00:08:09 -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=kDJw3PE3; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Lao1az8f; 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 S232130AbjG0Fi4 (ORCPT + 99 others); Thu, 27 Jul 2023 01:38:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232024AbjG0FiT (ORCPT ); Thu, 27 Jul 2023 01:38:19 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC7BE3C2B; Wed, 26 Jul 2023 22:37:29 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36R0s69b005131; Thu, 27 Jul 2023 05:36:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=OgpMpNgQI1DLSPfWpkGwPWMj/X8nliJeXNdo+NepQk0=; b=kDJw3PE3jalqEUANzYLuKaRIdM1ZNDkv8Qm4j64dg8mZP0y32XfIqlLvGURylvdlAyrd ehcwcTPcE54keD1EZu6wp8JsCKsUhZShEkJZX8p2Y3mj0gEBBuWLtZuLCy60XCMF5Jjr 7K844WXwu8kYDJhP3KcsWsthigWDnWWPeo9Qm7SEtLk/uq8fiB3GPoT+A6DFguW8Mv1r 53wanz7TmQxasJIlZjByy+jMNkhSFAqGVYh9z1i+IVOgDQepSHuawH9PKqIhX84blBz6 QHkHd8UWkIQT7arL8ubENwsfIszP8gUFgSARM7svisswVVVdotxEvOVRfNXG5z4sbffv uw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s075d91jx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2023 05:36:09 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 36R52g72023062; Thu, 27 Jul 2023 05:36:08 GMT Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2047.outbound.protection.outlook.com [104.47.74.47]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3s05j75akv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Jul 2023 05:36:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CMzDyEgbnMBipg3u7F22Sjz2G7S+nC0RQ2ksC25vP6xzavAYrHEVo0xBJoBfZBkxMKg3WZKaBOnRQ2GeG6OYJXO7eSe17w4lqyOZUadbN6lYGeF0KfotnSUOajO1WhlVxy7Q08r97k1XuzHhrJw5RxgH+xGHPDu9J1BR68RS5OL2WQemme9YrbtJ/F6PyjHNxqo4vVI8OdCz6MR+dKBZozl3ueLIqkHBK4vwtEyqlEEChI5nZre1oAzO0EVQEkeI6DmkoRXjc6aPH4muPBp4/nuMwpyqQYRqL4t6TV/5cO6v76y1dXOxYLWlnhXocW9DeLLYN+QdgS+PERirOWHHGA== 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=OgpMpNgQI1DLSPfWpkGwPWMj/X8nliJeXNdo+NepQk0=; b=TQXomPbjixXKHcBPy2PcIRwL+M+2YOeeb0DVww5YHXe8+eicHt2C/OXcvt6JwzeHmdPdVYcIPXcsnGn6f6W4yHKiH+bGbj1VagVvjgowHBwWaLQwCfa35ch14+ax/X5xbqrsvVpeXcc0fGPOojz9lvHUEpo1M95DMIC0Cczmf7cPzZ1D/NVJAyWE7G6kQEcGCrZCQxxBvqGX2NRp11kRuTrjVagpQqQhVfzaeynyHcyAUwuDU7enMNhUaWMIuL86c7L4Tp17mThux3Z6vjzlsxEvAA+fPLi1vJBin11mcRpB6DOLzESQ/Z+G1pEbxa5NRJVwF063GgM/BcvKDueEGA== 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=OgpMpNgQI1DLSPfWpkGwPWMj/X8nliJeXNdo+NepQk0=; b=Lao1az8f+8bvdlyF9JLNBwgXfVVL3ptTxO5kJucuYsMW6AxSSi2YEy9leYWby5dnKHHWAVRJy+oTch/VpWp4rBoYbohcho4uYe8a/hdQd+wfKMlCCBw22KL5/nxErqsSsH+v0JNTUlZsIh+1e8f+7ojh10Oxmzhm6tnVBR0J7vw= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by DS0PR10MB6994.namprd10.prod.outlook.com (2603:10b6:8:151::6) 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 05:36:05 +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 05:36:05 +0000 Message-ID: <8b0a1619-1e39-fc3a-1226-f3b167e64646@oracle.com> Date: Thu, 27 Jul 2023 15:35:58 +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 Content-Language: en-US From: Imran Khan 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> <3505769d-9e7a-e76d-3aa7-286d689345b6@oracle.com> In-Reply-To: <3505769d-9e7a-e76d-3aa7-286d689345b6@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: BY3PR05CA0014.namprd05.prod.outlook.com (2603:10b6:a03:254::19) To CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PR10MB4468:EE_|DS0PR10MB6994:EE_ X-MS-Office365-Filtering-Correlation-Id: c42c771f-e69a-40f2-4b21-08db8e635f4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pMiteIktOdAEATgHtFCeSXd/NYySjZ5vzx4/jOWk1VgFc6+92Wvg/u41UU9wQwrGmhlCMyzB9sFX6vyaopcx2xCGQOSTBAOv/HSPFPjueAwTTysR6Edy63Ck34WbDakWx0mqJezviErk9xnHYsOLwomA60D4uGAnk5qzQW8Rfm9OHrYyrLRDY10rR9yZzPzG8o0pJBbN4Du/Tz58vUeZlfXVGckm/MNNFrkDglV7e7d/O8GKIt52q85+/Sfgp0GYmeFsmtEch8LRKRC20T+wueok/mjqWblABasB4OwwPl/Rf80EcVjSdZXsc3oH5tuclvZPNOTdV0OCXJxPScfI1mAapLGs76TP/dNDIFLU/d8jdGWUk6jygN6rUQ3Z+BHz24KwD1QN0Y5n07hPYtD+Heqr8lPsLqnfncli6oBsJ6pARSXERiNNybfG1kI927Ja5G35ifGv8nos9JSjyCXS0Ak3fJIFpwIqYSSNjdssmJDNFmvUfCpVJYAOYxb/gw5rkumRn/0Yt4OyXKZgL0d+VZR9RXTapVvor4iKY7GSwYi0qwHsZEd5U7tYHofXFW7+7wEhuqYl2p7s41RqdC2tvuRaX/eVikoFdai6L7+NizOrVVlgPHR6XK+qEi/SyUB0gS/r7cyW7c8mTQXDiZHpGssVj3TKji6LjBfI+hGmAZ0qhesvIlAP8i+8RuoQFCvi 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)(39860400002)(346002)(366004)(396003)(136003)(451199021)(478600001)(110136005)(54906003)(31696002)(86362001)(316002)(4326008)(66476007)(66556008)(66946007)(6506007)(186003)(26005)(6666004)(6512007)(6486002)(53546011)(7416002)(5660300002)(8676002)(8936002)(38100700002)(41300700001)(2906002)(2616005)(36756003)(83380400001)(31686004)(66899021)(192303002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bXlxSkNRdUcxMzgvRGJrN1NIOXBaditmb3k0N3RDajlVN0lqRlQ0WFl4WHAz?= =?utf-8?B?ZW9XWXNxUk5xalFPenRsK0ovbl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bzEzOWVacDdMWTU1RElyaldsR0tGUXcwYmRpbElPNEhmN2hS?= =?utf-8?B?YWdySnYxZWprbHFzZGJqS0hVR2hVK3IzalRhQm13REVGYWs3bThIZEJIem8y?= =?utf-8?B?ak0wdz09?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c42c771f-e69a-40f2-4b21-08db8e635f4a X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4468.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jul 2023 05:36:05.5853 (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: YsRFM/DvKG9gXOZ3DDfQwYBm8ZoZScUbMTXtcIQOT1WXNXVKpZV3kO9my3wIk14xRGnEPIScfPZnXdrm05KE0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6994 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 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307270049 X-Proofpoint-ORIG-GUID: kzn0WBUkNA25jBQtM6LLSo_wH9_OCFfs X-Proofpoint-GUID: kzn0WBUkNA25jBQtM6LLSo_wH9_OCFfs 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 again Ian, I take back my previous comment :). On 27/7/2023 2:30 pm, Imran Khan wrote: > 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. > kernfs_refresh_inode can still race against kernfs_link/unlink_siblings. So your change looks good to me. My tests are not showing any issues either. ( I tested on 4.14 and 5.4 kernels as well). Fee free to add my RB. Reviewed-by: Imran Khan > 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); >>>