Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp71638iog; Tue, 14 Jun 2022 19:27:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7gaMBegrq5e7OnCQ4oaT8qUaQf5jU6Gtx9E4FwNN8s9BVC0aej78JpByEG22KjLemhhjj X-Received: by 2002:a63:5fc3:0:b0:3fd:f15d:5df6 with SMTP id t186-20020a635fc3000000b003fdf15d5df6mr6729748pgb.573.1655260071523; Tue, 14 Jun 2022 19:27:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1655260071; cv=pass; d=google.com; s=arc-20160816; b=xbPqbNY8wiEOkZGht6XiN3wtZFupC9iWzhERBYrJiJqBxyQgDegSL69QXafzlG3lZ0 LrHOtkK+KZRplfuRxYzwwXTcZrHueXG6ykAuuiWfyDZr03bJvONagRRUxcSfBgQtreTk gbKXxpke8GUX6xbQl40ifGe411hB8l3f+qsi2I4WKkFruNjGujrBrJ8582e3C4gtdASk eSFhkVo7mVRi1EM5tvVS0WDABpN7zhGqewQXZxlpIrKE0ocYhGRhgTq2hMj7bDF7ajv3 c6Tj803tw69T+hC5tegsJ0jRAdNDajZpvi15NNaWj6hL6+RWn/qFuUvIKuwnCW3o05MU EZvw== 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=lU2VDt13KTEmx9Rz9TIXPBNO2OIxyDufA2l0cvHbtjk=; b=BthwCYLa/805vQuBaKQGyiU3dsMaA16ds/3aSYEi3YpK1WH/NxEdKbZW0PpanuoJhv mai7F+grosrsnQkRQe+qEGGORkx+1ZoQTcNGziNZCt6zAfLRKfskq5VkUwYEjfRXuQce b/frdCPM5UsfZLm8zx8VtuanO9ZrDNKT1uCMuW2ijV9pfmvomlG5aKK6LYB60KwG0Lns WlrA9hCG8HPJtvkuND5ugUzAfRmtteqvliwu08v+TcxVTabjsyDkgeuv9iAOIAS+RA6h 2DQGxO43VL/4O05/+RCzyodOWHdeABpACKTs8Ucn44u6vMdCsAMpT7NUjQY0icB04hZq yZaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=BvHoQMGN; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=fj9CVanO; 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 u16-20020a170902e5d000b001689d2e0094si18767346plf.459.2022.06.14.19.27.20; Tue, 14 Jun 2022 19:27:51 -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-2021-07-09 header.b=BvHoQMGN; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=fj9CVanO; 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 S237794AbiFOCOI (ORCPT + 99 others); Tue, 14 Jun 2022 22:14:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231789AbiFOCOH (ORCPT ); Tue, 14 Jun 2022 22:14:07 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C38332EA2A for ; Tue, 14 Jun 2022 19:14:06 -0700 (PDT) Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25F0T3Z2015214; Wed, 15 Jun 2022 02:14:03 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=lU2VDt13KTEmx9Rz9TIXPBNO2OIxyDufA2l0cvHbtjk=; b=BvHoQMGNQksBwRbn36DpazSyYLHJRzmHeHgxHf4B6ngVXbKNEPcI2X+HYyFcJ3SCzEED LGf1JR/OgeY2J0JPIibkUqrF/NrSD8b937/IBnE5bbNvdbuQkx08G0lClWedsSz+ADTh +EhlVI4zLZe9RaRsprfp5IjHMZnHGJFtZhnoijcMfnBNbRQuRqKY/sENjX00nla2kNZM Rk1AQ5zYO/csLVxjsZGFwrzfLAJII9SzkzGcpqD4u+Vdzy82OFkDSFzOT8H+E6f4WtlO ZYChqGtKvl3S2Io5s4l43cxoV/T6q/RH3Pn37GQIcq9Phl3bOooJXENy6uyaJciUpOlA mw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3gmhn0fbqd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jun 2022 02:14:03 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 25F2AAPk021148; Wed, 15 Jun 2022 02:13:58 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2049.outbound.protection.outlook.com [104.47.66.49]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3gpqq0u1tn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jun 2022 02:13:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ez9jeI7pBoyZu+UjfBPX77ixfr3YJ+UsnlU6OZGq2lUAp5xBhsYrid3j7F7potGyNl/OQBom+Z70e7pfMapopIZWJsaoteE2zqPeth6wQqBp6r/NjSqohpzEsA4WXjGXhBY4CGhab9ZE/owRXE7iE9TneVdTMUxnisC4YlmnnX8qemQuldhrlFWmi6zmGWD9heSMlNjWyDpCI2+3wc7XYecpozNiEoCDF3IQSRmUwzoKTMWdXao38TnXCs6mg0zDtIITewU5miB0OY7zdE9CuMv/Xsiwdl85EcdnirKUbKkLYr5CKB3E51VjSiMmFWRpVMw0AWGR99Gg4oiJq2nm0w== 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=lU2VDt13KTEmx9Rz9TIXPBNO2OIxyDufA2l0cvHbtjk=; b=YD/w22RwkrjkfhE8fjtAQpzE7tnW3Yh7Vs34qY944FZjG8Zs0c6E5p5DJ3XU2Gbq7IvNhyxkymYb2VRA6+67N7W+BSWGw2BLGMawvZjTnzNXQ6ZyBqoCEZ5gFKxCmzvTY02oXyCi4Vaua+1K7zqEnyGOFTCa1mG9NLDCXnDlxYbH4ZoFTlqlRzlewBl4tquc4XqyIScAGykT+K3SPRS/6VdVCwei6UGT/oiPPrHUCxCVyinX/5FxFsPyKaB52fG7wd/JJAggircKYGWhhF2imQcOfcp6etMDrEIyIrH4FJblWCKdhZeyijHVwM/1oe0rWF6SZswqYxJ2Jts7cidC9g== 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=lU2VDt13KTEmx9Rz9TIXPBNO2OIxyDufA2l0cvHbtjk=; b=fj9CVanO+uvFYgH5WQ4UalXSD4LxLClOyDQtGbzwcz/jjlXB6r0atbufnFDEb3bo+BOeWIIGjoJlJXOQ9lfh8ZLSqmhUEFnPHf6xTG2HaOazrOV/XxguKAvQ0TNRb+gOK4b+zva+csTcZ3bfOIxINQDSP/JbFrzi+m+ColmZmEk= Received: from CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) by BN8PR10MB3636.namprd10.prod.outlook.com (2603:10b6:408:bb::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.16; Wed, 15 Jun 2022 02:13:56 +0000 Received: from CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::e9bd:ba52:c1c2:11e0]) by CO1PR10MB4468.namprd10.prod.outlook.com ([fe80::e9bd:ba52:c1c2:11e0%9]) with mapi id 15.20.5332.022; Wed, 15 Jun 2022 02:13:55 +0000 Message-ID: <89ca35ba-0290-b155-b290-5e70efafa9bb@oracle.com> Date: Wed, 15 Jun 2022 12:13:48 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v6 1/4] kernfs: make ->attr.open RCU protected. Content-Language: en-US To: Tejun Heo Cc: gregkh@linuxfoundation.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org References: <20220614070346.810168-1-imran.f.khan@oracle.com> <20220614070346.810168-2-imran.f.khan@oracle.com> From: Imran Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SY4P282CA0010.AUSP282.PROD.OUTLOOK.COM (2603:10c6:10:a0::20) To CO1PR10MB4468.namprd10.prod.outlook.com (2603:10b6:303:6c::24) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1efd08a9-7c80-4925-7245-08da4e74b331 X-MS-TrafficTypeDiagnostic: BN8PR10MB3636: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: OEvLwn4/lCcMZH6UkplZw4OiDdIzoXkp1PjR732cZOCKDgH/jFg0Kn0NNvdURL4eRM4EJLynuWAqS6Ulsk4iaJtDaGsg0Yo3g2PjhpDvUtElonfCJ9GtdvlerY/MUM227LZSMPj8rDpqGKVdfo2fmymWbUn3dbhd0FojtA+YZ49qgN3zF0yf6IkftC23vIreW6j9v1+LrPbx2qzaq75CJUhVk4IYGzVEfAl7PPjwfjEHL7LrmjGo3p5tLtcEYmRqnl9D/1ci3vxwToWtJQh/HmiRgy4BmCF/t97ygbRZArN1+rXq17ETCWAsy0p0Vxks64l5c03eIcleSU99CjtSumXiF0dOp+Cli3cdNN1De/0bJ6zTZZZ8VsjFp5vhAi7VSe82rddZUxGcC+51yUwR416lwlpuaJtb2EoUbnQBbsC6A2dCQiUtWMJT2NXvC13gOcMgbsSvdYroVaGeGsxSPVJbdCABsQVUjF41Kewy2rbVShpWyzXsKMC3MYj7Fn6waMrEMXkeq4XTScONeIO2GRpY+si6XzSWDIMtCkfDtiXSXE7AJDp6i57kazk6ZE+FPfKKQvJa1R8bG+vS8a1bWn21ZwXn84BI7+bvx9x6vWHtL/Qhs4wHnPkPegFjMmdA9CP2CQBarPximeVJV+p6tcG057EB5Xvrj2Ykik+mLBN6TA12G05aDe6nWEbH5GY+M6CHV37K43B8l6kKiw/XDRFMnuu8aYQIE6OnFXfAcfSTSe4hLsmGlTyfL47zhuD+k9cMH242SsEzwGR9KPWS7TiejwqfHRALTw69XQEr2csY9PCruggiEwMxa++Loaf8 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:(13230016)(366004)(6666004)(8676002)(508600001)(6506007)(316002)(83380400001)(2906002)(4326008)(31696002)(31686004)(86362001)(36756003)(6486002)(53546011)(26005)(6512007)(6916009)(2616005)(186003)(38100700002)(66556008)(66946007)(66476007)(5660300002)(8936002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cEhPQVB1Q0NNSGMzb2hQMjN3dzhPTVo4SjFNV3cwNTY2VW4yaXFoR2ZyclBT?= =?utf-8?B?MjlqNzVDQUh2ZDdHWnNGQjU5WndMaVpJZEZCUmF0RWFOcTNLczNVcUF2RHlF?= =?utf-8?B?SUk5Si9NcStiUHVkQ3o2QUFSWnprRytCa3NSN21YVHJ5ZVdqb0pCcWU1bWVx?= =?utf-8?B?YWZSSXJvdkRNZmZDVTBRVU4yN3J3Y0RsdHU0cmU3ajZrcElCRTBSM2dnMHcx?= =?utf-8?B?MzdJR1BZaHJ3UXQwT0hwb29WVldBV25RTm1BNWIycE5PNnVlbHRhTkY0L0pr?= =?utf-8?B?NWhtUFFNZ1plQWdPMHN4Vlo5TUdvSk9rdm4yQX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czJjck1tZE9kK3EwZ1pHSGwyVm8wU041K3NYcmRPMHJsMG9QTm5MTVRw?= =?utf-8?B?dGpFMisyZkZiQW9raEZNZHg3T0VkWmhyYVJiK2xxRWZXM1BwRlIvQUNwa1Bm?= =?utf-8?B?eEJkeUNVbFFLLzEvL0pQeWhwak4veThtTjJWUGp5RW81RWQvNy9vdzUveUNq?= =?utf-8?B?Z1djK0dhbG1ITStZMEx4ZDVOUVlVZUExWHJvQ29BelZaZzd6K29tSCtib1pF?= =?utf-8?Q?2j1Mzzn2QS89Bwic=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1efd08a9-7c80-4925-7245-08da4e74b331 X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4468.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2022 02:13:55.9005 (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: WjetKwzzQpB3vyGxQagmN0Nng0SF87fJK/Du/EqBgdBsVErYmDzsPKVMJqcwaH7nAKAGWWxG35siZYlNQeRyJg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR10MB3636 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517,18.0.874 definitions=2022-06-15_01:2022-06-13,2022-06-14 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxlogscore=999 bulkscore=0 spamscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206150004 X-Proofpoint-GUID: ynSkOynTa-YhYvOi2EtYgFQOuJLiX3FK X-Proofpoint-ORIG-GUID: ynSkOynTa-YhYvOi2EtYgFQOuJLiX3FK X-Spam-Status: No, score=-4.0 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_H2,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 Tejun, On 15/6/22 2:20 am, Tejun Heo wrote: > On Tue, Jun 14, 2022 at 05:03:43PM +1000, Imran Khan wrote: >> +/** [...] > > Hey, so, the difference between rcu_dereference_check() and > rcu_dereference_protected() is that the former can be called either with rcu > read locked or under the extra condition (here, open_file_mutex held) while > the latter can't be used under rcu read lock. The two can generate different > codes too - the former enforces dependency ordering which makes accesses > under rcu read lock safe, while the latter doesn't. > > In the above, you're saying that the accessor is only to be used while > holding kernfs_open_file_mutex but then using rcu_dereference_check() which > is odd. There are two ways you can go 1. ensure that the accessor is always > used under the mutex and use rcu_dereference_protected() or 2. if the > function can be used under rcu read lock, rename so that the differentiation > between the two accessors is based on the parameter type, not whether > they're protected or not. > I am going with option 1 suggested above, since the accessor will always operate under kernfs_open_file_mutex. > Can you please post the updated patch as a reply to this one? No need to > post the whole thing over and over again. > I am sending the full patch-set because after modifying PATCH-1 we will get a conflict like below when applying previous version of PATCH-3 static struct kernfs_open_node * kernfs_deref_open_node_protected(struct kernfs_node *kn) { <<<<<<< HEAD return rcu_dereference_protected(kn->attr.open, lockdep_is_held(&kernfs_open_file_mutex)); ======= return rcu_dereference_check(kn->attr.open, lockdep_is_held(kernfs_open_file_mutex_ptr(kn))); >>>>>>> 80411dbfe1890 (kernfs: Introduce interface to access global kernfs_open_file_mutex.) Full patch-set will avoid this small conflict. I hope sending full patch-set is okay for this time. The full patch-set (v7) is available at [1] Thanks -- Imran [1]:https://lore.kernel.org/lkml/20220615021059.862643-1-imran.f.khan@oracle.com/