linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH -mm] c/r: prctl: Add missing minus in error code
Date: Wed, 21 Mar 2012 02:08:51 +0400	[thread overview]
Message-ID: <20120320220851.GJ14269@moon> (raw)

The error code should be a negative value.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 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(-)

Index: linux-2.6.git/kernel/sys.c
===================================================================
--- linux-2.6.git.orig/kernel/sys.c
+++ 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;

                 reply	other threads:[~2012-03-20 22:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120320220851.GJ14269@moon \
    --to=gorcunov@openvz.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).