summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2012-01-19 09:51:07 -0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-03 05:54:26 -0800
commitacf1905328610145bd85c0178479d3a70c7098ee (patch)
treedc81e9124e9926e043180fb9dd46f3f49ab6c0de
parentf7e9d535119e1a5d030867f3581261204ba637cd (diff)
Revert "proc: enable writing to /proc/pid/mem"
This reverts commit 198214a7ee50375fa71a65e518341980cfd4b2f0. (cherry picked from commit dac306d896642f3dfcd878ab6a0a5b8c123722f3 from android.googlesource.com/common.git) Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Change-Id: Ia8947a59125e9318f1c51cb63ceb15a6e136aad9 Reviewed-on: http://git-master/r/78884 Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r--fs/proc/base.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 445777158609..fc03d161a1d6 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -891,6 +891,10 @@ out_no_task:
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)
{
@@ -949,6 +953,7 @@ out_task:
out_no_task:
return copied;
}
+#endif
loff_t mem_lseek(struct file *file, loff_t offset, int orig)
{