Revert "proc: enable writing to /proc/pid/mem"
Dima Zavin [Thu, 19 Jan 2012 17:51:07 +0000 (09:51 -0800)]
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

fs/proc/base.c

index 4457771..fc03d16 100644 (file)
@@ -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)
 {