proc: account "struct pde_opener"

The allocation is persistent in fact as any fool can open a file in
/proc and sit on it.

Link: http://lkml.kernel.org/r/20180214082409.GC17157@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alexey Dobriyan 2018-04-10 16:31:12 -07:00 committed by Linus Torvalds
parent 195b8cf068
commit 2acddbe816

View File

@ -103,7 +103,7 @@ void __init proc_init_kmemcache(void)
init_once);
pde_opener_cache =
kmem_cache_create("pde_opener", sizeof(struct pde_opener), 0,
SLAB_PANIC, NULL);
SLAB_ACCOUNT|SLAB_PANIC, NULL);
}
static int proc_show_options(struct seq_file *seq, struct dentry *root)