Skip to contentSkip to conversation

Missing __user in pointer referenced within copy_from_user

PATCH New Glauber de Oliveira Costa 1 participant 1 message Feb 15, 2007 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Missing __user in pointer referenced within copy_from_user

Pointers to user data should be marked with a __user hint. This one is missing.

---
 fs/proc/base.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/proc/base.c +1 -1
index 4f5745a..01f7769 100644
@@ -581,7 +581,7 @@ out_no_task:
 
 #ifndef mem_write
 /* This is a security hazard */
-static ssize_t mem_write(struct file * file, const char * buf,
+static ssize_t mem_write(struct file * file, const char __user *buf,
 			 size_t count, loff_t *ppos)
 {
 	int copied;
Signature · 1 line
1.4.4.2