Commit 22c2c5d7 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds

[PATCH] proc: Kill proc_mem_inode_operations

The inode operations only exist to support the proc_permission function.
Currently mem_read and mem_write have all the same permission checks as
ptrace.  The fs check makes no sense in this context, and we can trivially get
around it by calling ptrace.

So simply the code by killing the strange weird case.
Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 68602066
...@@ -927,10 +927,6 @@ static struct file_operations proc_oom_adjust_operations = { ...@@ -927,10 +927,6 @@ static struct file_operations proc_oom_adjust_operations = {
.write = oom_adjust_write, .write = oom_adjust_write,
}; };
static struct inode_operations proc_mem_inode_operations = {
.permission = proc_permission,
};
#ifdef CONFIG_AUDITSYSCALL #ifdef CONFIG_AUDITSYSCALL
#define TMPBUFLEN 21 #define TMPBUFLEN 21
static ssize_t proc_loginuid_read(struct file * file, char __user * buf, static ssize_t proc_loginuid_read(struct file * file, char __user * buf,
...@@ -1697,7 +1693,6 @@ static struct dentry *proc_pident_lookup(struct inode *dir, ...@@ -1697,7 +1693,6 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
#endif #endif
case PROC_TID_MEM: case PROC_TID_MEM:
case PROC_TGID_MEM: case PROC_TGID_MEM:
inode->i_op = &proc_mem_inode_operations;
inode->i_fop = &proc_mem_operations; inode->i_fop = &proc_mem_operations;
break; break;
#ifdef CONFIG_SECCOMP #ifdef CONFIG_SECCOMP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment