diff options
| author | Andrey Ryabinin <aryabinin@virtuozzo.com> | 2017-11-17 15:30:42 -0800 |
|---|---|---|
| committer | Paul Lawrence <paullawrence@google.com> | 2017-12-18 09:41:57 -0800 |
| commit | 48eb2bc60c2504cd2bcb5a67a5bcc50af693eec8 (patch) | |
| tree | 4c3633651405e3557c77311522d71841f666d2d4 /kernel/kcov.c | |
| parent | b67f35bcaea1f2fef36166ac0663b0d3b543ed38 (diff) | |
UPSTREAM: kcov: remove pointless current != NULL check
__sanitizer_cov_trace_pc() is a hot code, so it's worth to remove
pointless '!current' check. Current is never NULL.
Link: http://lkml.kernel.org/r/20170929162221.32500-1-aryabinin@virtuozzo.com
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 64145065
(cherry-picked from fcf4edac049a8bca41658970292e2dfdbc9d5f62)
Change-Id: Ia76e8c6cc0dc3fb796d8e8b92430fcf659b52eee
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Diffstat (limited to 'kernel/kcov.c')
| -rw-r--r-- | kernel/kcov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c index f348bcbea7d2..9b909cce4deb 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) { |
