public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
	akpm@linux-foundation.org,
	Andrey Konovalov <andreyknvl@google.com>,
	tchibo@google.com, syzkaller@googlegroups.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] kcov: remove pointless current != NULL check
Date: Tue, 19 Sep 2017 14:32:37 +0100	[thread overview]
Message-ID: <20170919133237.GF30715@leverpostej> (raw)
In-Reply-To: <20170919124648.28963-2-aryabinin@virtuozzo.com>

On Tue, Sep 19, 2017 at 03:46:47PM +0300, Andrey Ryabinin wrote:
> __sanitizer_cov_trace_pc() is a hot code, so it's worth
> to remove pointless '!current' check. Current is never NULL.
> 
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Thanks,
Mark.

> ---
>  kernel/kcov.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/kcov.c b/kernel/kcov.c
> index 2f0e7a7c7afc..14cc8c1a7cad 100644
> --- a/kernel/kcov.c
> +++ b/kernel/kcov.c
> @@ -61,7 +61,7 @@ void notrace __sanitizer_cov_trace_pc(void)
>  	 * We are interested in code coverage as a function of a syscall inputs,
>  	 * so we ignore code executed in interrupts.
>  	 */
> -	if (!t || !in_task())
> +	if (!in_task())
>  		return;
>  	mode = READ_ONCE(t->kcov_mode);
>  	if (mode == KCOV_MODE_TRACE) {
> -- 
> 2.13.5
> 

  parent reply	other threads:[~2017-09-19 13:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19 12:46 [PATCH 1/3] kcov: remove #ifdef CONFIG_RANDOMIZE_BASE Andrey Ryabinin
2017-09-19 12:46 ` [PATCH 2/3] kcov: remove pointless current != NULL check Andrey Ryabinin
2017-09-19 12:57   ` Dmitry Vyukov
2017-09-19 13:32   ` Mark Rutland [this message]
2017-09-19 12:46 ` [PATCH 3/3] kcov: remove useless barrier()s Andrey Ryabinin
2017-09-19 12:57   ` Dmitry Vyukov
2017-09-19 13:52     ` Andrey Ryabinin
2017-09-19 13:54       ` Dmitry Vyukov
2017-09-19 14:29         ` Andrey Ryabinin
2017-09-19 14:42           ` Dmitry Vyukov
2017-09-19 13:03 ` [PATCH 1/3] kcov: remove #ifdef CONFIG_RANDOMIZE_BASE Dmitry Vyukov
2017-09-19 13:30 ` Mark Rutland
2017-09-19 13:47   ` Dmitry Vyukov
2017-09-29 16:20     ` Andrey Ryabinin
2017-09-21 22:16 ` kbuild test robot

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=20170919133237.GF30715@leverpostej \
    --to=mark.rutland@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller@googlegroups.com \
    --cc=tchibo@google.com \
    /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