summaryrefslogtreecommitdiff
path: root/fs/proc/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-31 05:20:14 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 22:13:14 +0400
commitb6cdc7310338e204224f865918f774eb6db0b75d (patch)
tree0525092aeb3cc02dbe67b41444444cfc7cd4449a /fs/proc/inode.c
parent21ba37c9cf2f2dcadaabd79dff384537124d216c (diff)
downloadlinux-b6cdc7310338e204224f865918f774eb6db0b75d.tar.xz
procfs: don't allow to use proc_create, create_proc_entry, etc. for directories
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/inode.c')
-rw-r--r--fs/proc/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index 908e97457319..a4aaaeee3342 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -462,8 +462,8 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
inode->i_size = de->size;
if (de->nlink)
set_nlink(inode, de->nlink);
- if (de->proc_iops)
- inode->i_op = de->proc_iops;
+ WARN_ON(!de->proc_iops);
+ inode->i_op = de->proc_iops;
if (de->proc_fops) {
if (S_ISREG(inode->i_mode)) {
#ifdef CONFIG_COMPAT