Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4382919ioa; Wed, 27 Apr 2022 02:33:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQMIVYdCdEiFFr67lY45DyzMuc90Fe6EdQMLY9yGvgfESIV4Rw9panru/U8Loet+wfVw38 X-Received: by 2002:a17:902:aa8e:b0:158:e948:27 with SMTP id d14-20020a170902aa8e00b00158e9480027mr27681689plr.69.1651052031542; Wed, 27 Apr 2022 02:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052031; cv=none; d=google.com; s=arc-20160816; b=F8G3nS8FMY8B16zHRehFlYMaKvxk1lMAU8cLDPvPRhrXLWA7qKQbipu+4ipKGUdAkG ronuVgpq6MGQFJ/2xQgqk9eFDxa42AyRg4nQaUymUOaFNNiJjJ8R+N54BUuEaBeyagNE e92wngzFoHYcf9k/u18dMyDcstd4RFAWJP1IuEuMfUuATT/hVLOTXIvu8ASJaa5vkU74 JwlER5v9k+Z91j8hZzYxA6wIxglRFZU/Q0OE0QVwuE3QbeAoRQ7AsqXGu34YcbO632/h htdCy2gKbgNqIds+nfUIpjRPFo4ab7k7Pzsyq06JxzhL6/HO+v0048Q+yV2j+blEUJfO s0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=Wma5qGl6m0DLICkK7OP23+WAeNsi/jPPc46lYaJH56Y=; b=t2YZsPEvguZxj22l3+/zSUM+x/lq1NsFfqLvrR07bEK+5mTCFK+xCUyw3eBpoIWDje 3MQOFfE1TPi/ahfN2fs5XFSlBNhC7SQ1NhB2J1PxvFd8C+sp2dyqSAnv/cgyDdUIjeDn kjILtsmVVwWuJLc566mRlJvzBWTNoLW1fs8JFPxF3/21atRQJY/UfafC1ghRyKvOSBEE a0BdI8J17wu+7oIqWmuPHTsujY21o8FDkaYSpRwitGOJ8ota5oxhlY7smJUgzTvzppRd nSaa63rshxaL4Ma/bdIsYvYHTWXtUNxP1yH1w03SQNOy5ibvR18u0MXZXZ3+8j6759RI Qqgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=G5EWZFxZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 187-20020a6308c4000000b0039db6053613si953602pgi.483.2022.04.27.02.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:33:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=G5EWZFxZ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 48B4425B427; Wed, 27 Apr 2022 02:13:39 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354743AbiDZUQp (ORCPT + 99 others); Tue, 26 Apr 2022 16:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240294AbiDZUQk (ORCPT ); Tue, 26 Apr 2022 16:16:40 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74D0C187B61 for ; Tue, 26 Apr 2022 13:13:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Wma5qGl6m0DLICkK7OP23+WAeNsi/jPPc46lYaJH56Y=; b=G5EWZFxZSPo4mQMq7QaYAzdmC8 RhHw7VC1l7yUY3zXOEKxOwoQDqH8g1TvbqsY09BAkgsZYSI1jlxPocy7JD1lcBF4/NSMKi5KvmYpp Afvz70JD3iLIUY8Ec2Fi3Pe5RaQ2Q2TQByQhbW4e1vhu/by4GeaF34lFhFPyJeJy5ARXOW5wuDHDr MtvDUZa1MZXs+vB726qNbXGIVjUt2dVAbfcP1Gs0XzWSj2wLxtbOWnR6hh8U8hSV+BLtOh15rYiWZ LyAPRUKOoylPrB3G6XU9LZksz2b+yQM8YSH91axQvmbVntcNTwz72Jx9XOW3IYKP3qZNy4su9mpph CI/2dDLQ==; Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1njRYo-009iwL-6x; Tue, 26 Apr 2022 20:13:22 +0000 Date: Tue, 26 Apr 2022 20:13:22 +0000 From: Al Viro To: Tejun Heo 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: Sender: Al Viro X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,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: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()... Al, back to life and staring at the pile of mail to sift through...