From: David Miller <davem@davemloft.net>
To: adobriyan@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: delete /proc THIS_MODULE references
Date: Tue, 16 Jan 2018 15:01:48 -0500 (EST) [thread overview]
Message-ID: <20180116.150148.555987913635993705.davem@davemloft.net> (raw)
In-Reply-To: <20180115214240.GC6942@avx2>
From: Alexey Dobriyan <adobriyan@gmail.com>
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 <adobriyan@gmail.com>
Applied to net-next, thank you.
prev parent reply other threads:[~2018-01-16 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 21:42 [PATCH v2] net: delete /proc THIS_MODULE references Alexey Dobriyan
2018-01-15 22:18 ` Stephen Hemminger
2018-01-15 23:06 ` Alexey Dobriyan
2018-01-16 20:01 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180116.150148.555987913635993705.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=adobriyan@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).