Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1853746pxu; Fri, 9 Oct 2020 01:08:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJ7YQZvVHBD/FBcc8ZxD6TDAjBSsdn6yoxXFiS6F/RilsoNcvTpGHiGX28i7U+xOq62eMU X-Received: by 2002:a17:906:118f:: with SMTP id n15mr13482778eja.394.1602230916816; Fri, 09 Oct 2020 01:08:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602230916; cv=none; d=google.com; s=arc-20160816; b=ugFaYiKrhsH1fSVsFggyvxqWgD55yItZbR8AFlH7JGtfrZDmhMo4FB/fc7kwNNWmvn Ba2486cJEmdA9Kb51AvuUBKMZIPJ1f/vRxa8bPkPyJrmAvzmKb/K6AU4LOeW1HaKTihd o/ssguEFY8OnqGG5wAX8v7NVsBiHAoQFjEGhyYBDUG9AhiDaA2usOGMBluKNBmaAdRct RY74IPjrOxzfcZHGZVVQf3LQgeDIb2LoUhzbz4ZU+sUWJ0vP6WGy7940cp/9TLeZFAdQ 9NtKrh1fv8NFVoGrkyjd2wbBj2Ono/xPG3JuZ4wUvl4no9Jjx4SwyfS/bieWZ27c1WpA ZjhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=gE8M3hDgJgucRkitvpb3XRnJ9ONApRGsY+goBTeQH+M=; b=dLHZKwocM9hseAQI8Xc8Bi0C9epmEPAfr2KqZipUiZQO3DWWLTySYpL4rG2CIzwPFg t3s1tY4hxnUnBT0r1ciXNpXSK9CGGHCVFk9lWbTKK7wyFOEQTLZ2fU2oZJa8xivx1Bud SnfhKC8ty+YFGv/qQXqFu/bcUJWXJdlrujphJebDGpg4hTdhCddT7hdagE6okdAlydfh KyyuyLmVMuNNrpRL/toDrLBpC5tWomyqhficnURa5XM/tAMFo57aWwjqUduvNxSY95kz sbr/lTrFu0shtevhxdqJ9OvFlI/JdW3kMEGH+JBJ6sYTDlfWSOZz2HT/O83sva+mznQg SMng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gz8si5742666ejb.135.2020.10.09.01.08.11; Fri, 09 Oct 2020 01:08:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732495AbgJIIGS (ORCPT + 99 others); Fri, 9 Oct 2020 04:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732337AbgJIIGS (ORCPT ); Fri, 9 Oct 2020 04:06:18 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F37F2C0613D2; Fri, 9 Oct 2020 01:06:17 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kQnPr-00296a-Hh; Fri, 09 Oct 2020 10:06:15 +0200 Message-ID: Subject: Re: [CRAZY-RFF] debugfs: track open files and release on remove From: Johannes Berg To: Greg KH Cc: linux-kernel@vger.kernel.org, nstange@suse.de, ap420073@gmail.com, David.Laight@aculab.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, rafael@kernel.org Date: Fri, 09 Oct 2020 10:06:14 +0200 In-Reply-To: <20201009080355.GA398994@kroah.com> References: <87v9fkgf4i.fsf@suse.de> <20201009095306.0d87c3aa13db.Ib3a7019bff15bb6308f6d259473a1648312a4680@changeid> <20201009080355.GA398994@kroah.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, 2020-10-09 at 10:03 +0200, Greg KH wrote: > For lots of debugfs files, .owner should already be set, if you use the > DEFINE_SIMPLE_ATTRIBUTE() or DEFINE_DEBUGFS_ATTRIBUTE() macros. > > But yes, not all. Right. You didn't see the original thread: https://lore.kernel.org/netdev/20201008155048.17679-1-ap420073@gmail.com/ > I thought the proxy-ops stuff was supposed to fix this issue already. > Why isn't it, what is broken in them that causes this to still crash? Well exactly what I described - the proxy_fops *release* doesn't get proxied, since we don't have any knowledge of the open files (without this patch) when the proxy_fops are redirected to nothing when a file is removed. Nicolai also discussed it a bit here: https://lore.kernel.org/netdev/87v9fkgf4i.fsf@suse.de/ > And of course, removing kernel modules is never a guaranteed operation, > nor is it anything that ever happens automatically, so is this really an > issue? :) :) We used to say the proxy_fops weren't needed and it wasn't an issue, and then still implemented it. Dunno. I'm not really too concerned about it myself, only root can hold the files open and remove modules ... johannes