Skip to content

Commit

Permalink
proc: enable writing to /proc/pid/mem
Browse files Browse the repository at this point in the history
With recent changes there is no longer a security hazard with writing to
/proc/pid/mem.  Remove the #ifdef.

Signed-off-by: Stephen Wilson <wilsons@start.ca>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Stephen Wilson authored and Al Viro committed Mar 23, 2011
1 parent 8b0db9d commit 198214a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,10 +854,6 @@ static ssize_t mem_read(struct file * file, char __user * buf,
return ret;
}

#define mem_write NULL

#ifndef mem_write
/* This is a security hazard */
static ssize_t mem_write(struct file * file, const char __user *buf,
size_t count, loff_t *ppos)
{
Expand Down Expand Up @@ -914,7 +910,6 @@ static ssize_t mem_write(struct file * file, const char __user *buf,
out_no_task:
return copied;
}
#endif

loff_t mem_lseek(struct file *file, loff_t offset, int orig)
{
Expand Down

0 comments on commit 198214a

Please sign in to comment.