Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp55049rdb; Mon, 4 Dec 2023 20:25:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHaXBLtLRFoufDOzyFz//QpzkyBvLxs8b+xz4rYF1NwQJhj9VAvbjZ8ODoH6q6NdWVx8y+a X-Received: by 2002:a05:6358:783:b0:16e:2740:7cfc with SMTP id n3-20020a056358078300b0016e27407cfcmr7070371rwj.25.1701750327153; Mon, 04 Dec 2023 20:25:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701750327; cv=none; d=google.com; s=arc-20160816; b=n6YKNfAujX3iTcvjbeXOu9/k/0AGuR/ZVMuSPhO0lYNebA/j3RlZB0AAYqb7uyyWCq hDjEyT7sSYNB/DhNNAdllomIbH6Rc18M/ml64TApU1VGbPtXkDsJrV7i9n/Pdua95myi dw4K9Ia+XbBzw1IBHhlvd48DmlCxUugEQIuolrSIUwTRMxXoJxIujwueWnRhyzTH7JVJ 4LEA+dozYn3byyTG9kc4x3flEM2MXuYzGU/fjNKZeSoXFXRm7h/M1FmG6Ied/bVhsVJV frANyLXkL/uAg6Fl4gOEZXwJzahc3sh9s5ge+300Yzifd9OB77tdqwvwf6CfB+GxdtUO wMJQ== 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:dkim-signature; bh=ciEW1LeR3t/8gBpD6ONZQ4CsEKOK/kc2ul3LCV6WX2o=; fh=Av36/8bFCqZZ24YOnHTKVOIN8K7TbxeRcpJ3DG+9pf8=; b=wBqj09e8x0Lwpqt9zvdqAHpnsHW6mnSwPKnVRNA879OtWso405x1FH7vf3FSEr+bsc 70xle1sWfLjJzCT92NuXjdi46a8GHvYya4mjIOcWDLKoRfn9DEJPvWsLkk5znV8QJwnS Xjy6ZzeFOzLik9IWUTd4d1AD5ZBsak5VijQH7Ap9cEip7PdPcl4I5NLHnDcstTScnbdL 8LCg8nJgFhg7boPmtsJ+/ysRRVSHeK8EfQmxJKL8mfhGjzsnpt6QCtI9LFp5534tpAmC haK8f6r65Q+lg4DwHrGZAVbHutl/le3hkB6o1mVVuPL+oL2UurIM94hU8lQIh5ta20iq EElA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQ4stgLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y9-20020a170902700900b001d054a8864csi5497769plk.308.2023.12.04.20.25.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 20:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQ4stgLp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1F46480ACB41; Mon, 4 Dec 2023 20:25:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbjLEEZH (ORCPT + 99 others); Mon, 4 Dec 2023 23:25:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229611AbjLEEZE (ORCPT ); Mon, 4 Dec 2023 23:25:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B2349C for ; Mon, 4 Dec 2023 20:25:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A695BC433C7; Tue, 5 Dec 2023 04:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701750311; bh=Jsp797QrY43cmAXZZXSoXO4WVJz03OTlJ4dLJhsYhJY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qQ4stgLpuvhbi+r5OKcn/+9iC63lI8H9UbpuHugQ/JarTchazINrKbpvg3ZEnJjRe CRxaSRlRZql2gN9RAgSZ8xrL7Ob3hIMtMfUnifXPWyfFZc1jZMvtuMl27v5MvonY3Y R1VCOFC32toDb6UM17K6774opzmDbvpMDNSMrdBeXHzxO0SeGVxcfcEWTilkbqA5N9 0a9bjS3CY+ubwQodOpG/aFv47I8bHBFq2ebX91gIu8f3AQqgbdAZzpe6IJv1pPCZbz JGhRIKovbAZ9pnmn5QmUG4BXIIwuDCNI8dRLGzaIJkhR61K5u+ed0ChFW2KMvyyahN 2eL9WmvzTIrdw== Date: Mon, 4 Dec 2023 23:25:08 -0500 From: Sasha Levin To: Johannes Berg Cc: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Greg Kroah-Hartman Subject: Re: [PATCH AUTOSEL 6.6 15/32] debugfs: annotate debugfs handlers vs. removal with lockdep Message-ID: References: <20231204203317.2092321-1-sashal@kernel.org> <20231204203317.2092321-15-sashal@kernel.org> <1a7a8caa3fe9b4e3271239b86ebd24a41464b79f.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1a7a8caa3fe9b4e3271239b86ebd24a41464b79f.camel@sipsolutions.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 20:25:26 -0800 (PST) On Mon, Dec 04, 2023 at 09:45:55PM +0100, Johannes Berg wrote: >On Mon, 2023-12-04 at 20:32 +0000, Sasha Levin wrote: >> From: Johannes Berg >> >> [ Upstream commit f4acfcd4deb158b96595250cc332901b282d15b0 ] >> >> When you take a lock in a debugfs handler but also try >> to remove the debugfs file under that lock, things can >> deadlock since the removal has to wait for all users >> to finish. >> >> Add lockdep annotations in debugfs_file_get()/_put() >> to catch such issues. >> > >This (and the previous patch) probably got picked up as dependencies for >the locking things, but ... we reverted this. > >For 6.6, _maybe_ it's worth backporting this including the revert, but >then I'd do that only when the revert landed to have them together. But >then you should apply all the six patches listed below _and_ the revert, >the set as here doesn't do anything useful. > >However ... given that debugfs is root-only, and you have to be >reading/writing a file _while_ disconnecting and the file is removed, >perhaps the whole thing isn't worth backporting at all. > > > >For 6.1 and earlier, I believe it's not needed at all, so please drop >from there all of these: > > - debugfs: fix automount d_fsdata usage > - debugfs: annotate debugfs handlers vs. removal with lockdep > - debugfs: add API to allow debugfs operations cancellation > - wifi: cfg80211: add locked debugfs wrappers > - wifi: mac80211: use wiphy locked debugfs helpers for agg_status > - wifi: mac80211: use wiphy locked debugfs for sdata/link > > >I'd kind of think just dropping all of these completely makes more >sense. Will do, thanks! -- Thanks, Sasha