diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-30 21:20:14 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:14 -0400 |
commit | b6cdc7310338e204224f865918f774eb6db0b75d (patch) | |
tree | 0525092aeb3cc02dbe67b41444444cfc7cd4449a /fs/proc/inode.c | |
parent | 21ba37c9cf2f2dcadaabd79dff384537124d216c (diff) |
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 908e9745731..a4aaaeee334 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 |