diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2022-07-23 20:09:07 +0300 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-29 18:12:35 -0700 |
commit | ed8fb78d7ecdeb3e2e86df0027e2c2cc55f9908b (patch) | |
tree | 7f920e6a5a183ce4b9c4ab5df660fb08ae64541e /fs/proc/proc_net.c | |
parent | fa7d574ba4f4f3f4f78d432c8545d9045daa89b1 (diff) | |
download | linux-ed8fb78d7ecdeb3e2e86df0027e2c2cc55f9908b.tar.gz |
proc: add some (hopefully) insightful comments
* /proc/${pid}/net status
* removing PDE vs last close stuff (again!)
* random small stuff
Link: https://lkml.kernel.org/r/YtwrM6sDC0OQ53YB@localhost.localdomain
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/proc/proc_net.c')
-rw-r--r-- | fs/proc/proc_net.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index bbce6fbe779c..856839b8ae8b 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c @@ -350,6 +350,12 @@ static __net_init int proc_net_ns_init(struct net *net) kgid_t gid; int err; + /* + * This PDE acts only as an anchor for /proc/${pid}/net hierarchy. + * Corresponding inode (PDE(inode) == net->proc_net) is never + * instantiated therefore blanket zeroing is fine. + * net->proc_net_stat inode is instantiated normally. + */ err = -ENOMEM; netd = kmem_cache_zalloc(proc_dir_entry_cache, GFP_KERNEL); if (!netd) |