Skip to contentSkip to conversation

c/r: prctl: Add missing minus in error code

PATCH New Cyrill Gorcunov 1 participant 1 message Mar 20, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 c/r: prctl: Add missing minus in error code

The error code should be a negative value.

---
Hi Andrew, could you please check if this patch is valid for -mm tree and it is not some left-over dangling in my local tree (found this typo while trying to describe error codes for man-page).

 kernel/sys.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sys.c +1 -1
Index: linux-2.6.git/kernel/sys.c
===================================================================
@@ -1881,7 +1881,7 @@ static int prctl_set_mm(int opt, unsigne
 		up_read(&mm->mmap_sem);
 
 		if (copy_from_user(user_auxv, (const void __user *)addr, arg4))
-			return EFAULT;
+			return -EFAULT;
 
 		/* Make sure the last entry is always AT_NULL */
 		user_auxv[AT_VECTOR_SIZE - 2] = 0;