Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507084
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] ARC: return -EFAULT on failed access_ok for arc_usr_cmpxchg syscall |
| Date | 2016-10-24 12:50 +0200 |
| Message-ID | <svKZj-6tF-3@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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(); -- 2.9.3
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] ARC: return -EFAULT on failed access_ok for arc_usr_cmpxchg syscall Colin King <colin.king@canonical.com> - 2016-10-24 12:50 +0200 Re: [PATCH] ARC: return -EFAULT on failed access_ok for arc_usr_cmpxchg syscall Colin Ian King <colin.king@canonical.com> - 2016-10-24 18:00 +0200 Re: [PATCH] ARC: return -EFAULT on failed access_ok for arc_usr_cmpxchg syscall Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-10-24 18:00 +0200
csiph-web