mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	Jiri Slaby <jslaby@suse.cz>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-snps-arc@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ARC: return -EFAULT on failed access_ok for arc_usr_cmpxchg syscall
Date: Mon, 24 Oct 2016 16:58:43 +0100	[thread overview]
Message-ID: <e4a1b8f6-8e21-eef3-fcf9-394cfa1d3216@canonical.com> (raw)
In-Reply-To: <92d0dd5e-8aa8-3e55-193f-1fa440cb3ff3@synopsys.com>

On 24/10/16 16:56, Vineet Gupta wrote:
> On 10/24/2016 03:47 AM, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> arc_usr_cmpxchg currently returns an uninitialized value in ret
>> on a failed access_ok call. Instead, return -EFAULT.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>>  arch/arc/kernel/process.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arc/kernel/process.c b/arch/arc/kernel/process.c
>> index a746008..9ae3e1c 100644
>> --- a/arch/arc/kernel/process.c
>> +++ b/arch/arc/kernel/process.c
>> @@ -47,7 +47,7 @@ SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
>>  	int ret;
>>  
>>  	if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
>> -		return ret;
>> +		return -EFAULT;
>>  
>>  	preempt_disable();
> 
> Thx for spotting this. Since this is new code, not yet merged, do you mind if I
> squash it with orig patch. I can add a Reviewed-by a SOB as you prefer.

Sure, squash it int and add me as a Reviewed-by.

Colin
> 
> Thx,
> -Vineet
> 
> 

      reply	other threads:[~2016-10-24 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 10:47 Colin King
2016-10-24 15:56 ` Vineet Gupta
2016-10-24 15:58   ` Colin Ian King [this message]

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=e4a1b8f6-8e21-eef3-fcf9-394cfa1d3216@canonical.com \
    --to=colin.king@canonical.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=akpm@linux-foundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.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

all inboxes | Powered by JetHome®