Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4425583ioa; Wed, 27 Apr 2022 03:42:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvR7ChKxVmwuemYTd/ZZVxj+FynyvHkIH6entyLLysnvDj1NwvO+QaS2s2oUNrCAURj4Vy X-Received: by 2002:a65:4381:0:b0:3a2:ca0a:7ed8 with SMTP id m1-20020a654381000000b003a2ca0a7ed8mr23098056pgp.15.1651056133940; Wed, 27 Apr 2022 03:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651056133; cv=none; d=google.com; s=arc-20160816; b=MMKx0EzWrpTLU8s+F49jGUgAVXH2EbgxvQVYeKedwEWLezuFWfwq4aNdmaJubRinJt vcriCVHRJdCMXTdypxxXzRJiTIlxiiLIAg74lC5RUcwhY8Nw32n6+AmtyjWFywvnsO20 6L1buCTDAI+nzhrS5k4TiY/yI81Qb79QMTmMmUrX3CiwAdXT1zSHPR9Xeqf0z1372uh+ fdk4SacnApJjgHHlf3pYqxhHddbTwUfGLtMBJraOBqzD0Ws4XNYABOaPoCLId3p+ts/k 5mq7Vjj3EDX5CMHZozegWvRXBuCcBLIhIThiiPRuJCUEfwHlF3gBXSYzY2Qrm+XZeh1m mjoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:sender:dkim-signature; bh=uvJxHyXfgLj1ZgKVawFWQdRMgkOnfWjoHaxt/IGWjk8=; b=ET9plb8beshFLWCWg5SoH8F6SUNh7+A7yqC0gRA3n5r74B98o5emQCN0hmsHdmmuK4 PaiR/+L9qdqNbRFiqtFVPQG7iGfa6B2RFYHeXoNvqqAgFO/ni2krJvSiXE4HQW3b4MhL 2saOOZU1u/wXUlwOp20ClIpKrqlfmPe2JLV88dsE8AGSPxNhjxnz+PiQPMX07nEeLYlB 9iaTHNNmIYIEgjf8lmySu/COaFqC71Ot7LJnRHjhcOVEgFBhHXQib5hB3e6aNvMgySuJ wNRpNS75hHF48dOf8HA0jaB8TDay8D4Y1ouP0rgKHV4qQSacnJhIhHwCI0o6rAkKwyqt mOtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UTbLbXRN; 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=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q16-20020a170902edd000b00158897b40e5si1194052plk.48.2022.04.27.03.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:42:13 -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=@gmail.com header.s=20210112 header.b=UTbLbXRN; 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=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8CADE3F08C6; Wed, 27 Apr 2022 02:51:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354885AbiDZUUi (ORCPT + 99 others); Tue, 26 Apr 2022 16:20:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355032AbiDZUTd (ORCPT ); Tue, 26 Apr 2022 16:19:33 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0527F29826 for ; Tue, 26 Apr 2022 13:16:25 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id y38so3223182pfa.6 for ; Tue, 26 Apr 2022 13:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=uvJxHyXfgLj1ZgKVawFWQdRMgkOnfWjoHaxt/IGWjk8=; b=UTbLbXRNJ0dAd026mrJNwVSpoYi1Cdsph/ZnyFL5LkZ6PaGTmkK5tePkW5vAI4PhHe xG8C70wpuoZYzxz6L5wCi4vClB3C+gNK5yvCACYd9V6sv6ibU04j1wSWE65e5TXg4OX1 pTfT82P1KQnVnZDuF63yABZM4xbXevoLv87bORkeAm4kS4BLvGBi+1X0wscUSmMvG3O7 J1N4/j4i6oiVVEGJEtyguAs0v54ZVTsV82qCezDOCxvA83erRrqIpdXuSuBsdwk92/Jr w1JPY0PCiU/syvAq8zKD/wHO8vpO4ZA93we8likeyc4jZgwQr/giwqg6ZzOKd8RVOb8O 0CzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=uvJxHyXfgLj1ZgKVawFWQdRMgkOnfWjoHaxt/IGWjk8=; b=ureO9wnLRgs4iRqN2myxd+gZXT6tNIGNcBtWVxk15Cvn9b+TBmrF3gwm9bI9wQW+E0 Nsma4XjXi9XkAnDjLWst4AY4jZdtAatUMPS04HZqpJOENnLvC3tGExbxWMQTYyw3lf66 Q6Wgf67ekM+hA8XZoVsiO4KCpfq6Nu2fNLR78XvUQE8ZfYX2iFh2EEwU9HQNBqqqFmKO ZC02bJetAavIWiGqRUmR2U/tDzgla31/Lwui1jnxkd14lB3t8J25nVbGYjln8I4fNfYn 3WtKUG4sMItsiJoEC8oBYFVtlEuxzbuHob27h7nbwcTN5yR+K90KLRTrqYUEvaGT9y6Y 96qw== X-Gm-Message-State: AOAM532J6HXvJPAIPvEYa5vNC+lOBN0Xgnn4t5/kqWGIPPhbBFujImQZ 8yW5P9o5dYD/dBkfBLuJpwk= X-Received: by 2002:aa7:9852:0:b0:50d:6d10:2094 with SMTP id n18-20020aa79852000000b0050d6d102094mr1721384pfq.4.1651004184324; Tue, 26 Apr 2022 13:16:24 -0700 (PDT) Received: from localhost ([2620:10d:c090:400::5:7a3e]) by smtp.gmail.com with ESMTPSA id co21-20020a17090afe9500b001cd4989fedcsm3713684pjb.40.2022.04.26.13.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Apr 2022 13:16:23 -0700 (PDT) Sender: Tejun Heo Date: Tue, 26 Apr 2022 10:16:21 -1000 From: Tejun Heo To: Al Viro Cc: Imran Khan , gregkh@linuxfoundation.org, ebiederm@xmission.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 01/10] kernfs: Remove reference counting for kernfs_open_node. Message-ID: References: <20220410023719.1752460-1-imran.f.khan@oracle.com> <20220410023719.1752460-2-imran.f.khan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 Tue, Apr 26, 2022 at 08:13:22PM +0000, Al Viro wrote: > On Tue, Apr 26, 2022 at 08:29:21AM -1000, Tejun Heo wrote: > > > The code is just wrong. You can end up: > > > > on = kn->attr.open; > > if (!on) > > return; > > > > // we get preempted here and someone else puts @on and then > > // recreates it > > Can't happen - the caller has guaranteed that no new openers will be > coming. Look at the call chain of kernfs_drain_open_files()... Ah, okay. It can only transition to NULL from there. It's still a weird way to go about it tho. Thanks. -- tejun