From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2] net: delete /proc THIS_MODULE references Date: Tue, 16 Jan 2018 15:01:48 -0500 (EST) Message-ID: <20180116.150148.555987913635993705.davem@davemloft.net> References: <20180115214240.GC6942@avx2> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: adobriyan@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:59240 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbeAPUBt (ORCPT ); Tue, 16 Jan 2018 15:01:49 -0500 In-Reply-To: <20180115214240.GC6942@avx2> Sender: netdev-owner@vger.kernel.org List-ID: From: Alexey Dobriyan Date: Tue, 16 Jan 2018 00:42:40 +0300 > /proc has been ignoring struct file_operations::owner field for 10 years. > Specifically, it started with commit 786d7e1612f0b0adb6046f19b906609e4fe8b1ba > ("Fix rmmod/read/write races in /proc entries"). Notice the chunk where > inode->i_fop is initialized with proxy struct file_operations for > regular files: > > - if (de->proc_fops) > - inode->i_fop = de->proc_fops; > + if (de->proc_fops) { > + if (S_ISREG(inode->i_mode)) > + inode->i_fop = &proc_reg_file_ops; > + else > + inode->i_fop = de->proc_fops; > + } > > VFS stopped pinning module at this point. > > Signed-off-by: Alexey Dobriyan Applied to net-next, thank you.