mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: Haavard Skinnemoen <hskinnemoen@gmail.com>,
	Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] AVR32: Return directly after a failed access_ok() in setup_rt_frame()
Date: Wed, 18 Jan 2017 14:46:24 +0100	[thread overview]
Message-ID: <59733f4e-18e2-9d71-31c8-dbf654c191f0@users.sourceforge.net> (raw)
In-Reply-To: <308dc151-c874-dfe7-64f9-24a63fc66883@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 18 Jan 2017 13:50:38 +0100

Return directly after a call of the function "access_ok" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/avr32/kernel/signal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 8f1c63b9b983..13c31a7b9ae4 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -141,9 +141,8 @@ setup_rt_frame(struct ksignal *ksig, sigset_t *set, struct pt_regs *regs)
 	int err = 0;
 
 	frame = get_sigframe(ksig, regs, sizeof(*frame));
-	err = -EFAULT;
 	if (!access_ok(VERIFY_WRITE, frame, sizeof (*frame)))
-		goto out;
+		return -EFAULT;
 
 	/*
 	 * Set up the return code:
-- 
2.11.0

  reply	other threads:[~2017-01-18 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 13:45 [PATCH 0/3] AVR32: Fine-tuning for two function implementations SF Markus Elfring
2017-01-18 13:46 ` SF Markus Elfring [this message]
2017-01-18 13:48 ` [PATCH 2/3] AVR32: Delete an unnecessary variable initialisation in setup_rt_frame() SF Markus Elfring
2017-01-18 13:50 ` [PATCH 3/3] AVR32: Return an error code only as a constant in sys_cacheflush() SF Markus Elfring
2017-01-18 15:12 ` [PATCH 0/3] AVR32: Fine-tuning for two function implementations Hans-Christian Noren Egtvedt

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=59733f4e-18e2-9d71-31c8-dbf654c191f0@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=egtvedt@samfundet.no \
    --cc=hskinnemoen@gmail.com \
    --cc=kernel-janitors@vger.kernel.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

Powered by JetHome