From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Dobriyan Subject: Re: [PATCH] net: delete /proc THIS_MODULE references Date: Mon, 15 Jan 2018 23:40:53 +0300 Message-ID: <20180115204053.GB6942@avx2> References: <20180113171152.GB1016@avx2> <20180115.145012.1807423040561212598.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org To: David Miller Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:40909 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbeAOUk5 (ORCPT ); Mon, 15 Jan 2018 15:40:57 -0500 Received: by mail-wm0-f65.google.com with SMTP id v123so4399473wmd.5 for ; Mon, 15 Jan 2018 12:40:56 -0800 (PST) Content-Disposition: inline In-Reply-To: <20180115.145012.1807423040561212598.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, Jan 15, 2018 at 02:50:12PM -0500, David Miller wrote: > From: Alexey Dobriyan > Date: Sat, 13 Jan 2018 20:11:52 +0300 > > > /proc has been ignoring struct file_operations::owner field for ages. > > > > Signed-off-by: Alexey Dobriyan > > What, then, makes sure that the procfs files are unregistered before the > referencing module is unloaded? Core /proc code does the magic just like core net code deletes interfaces correctly if ethernet modules gets deleted. Most fs/proc/inode.c is dedicated to this. > Please explain the situation, and add a reference to the commit that > made procfs stop using the fops owner field. That commit and it's > commit message may help explain why all of this is fine. Sure. It was ~10 years ago :^)