summaryrefslogtreecommitdiffstats
path: root/kernel/kcov.c
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2017-11-18 00:30:42 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-18 01:10:04 +0100
commitfcf4edac049a8bca41658970292e2dfdbc9d5f62 (patch)
treea8745b419a9e85949417c3d7a42b39ddbfe4b697 /kernel/kcov.c
parentkernel/panic.c: add TAINT_AUX (diff)
downloadlinux-fcf4edac049a8bca41658970292e2dfdbc9d5f62.tar.xz
linux-fcf4edac049a8bca41658970292e2dfdbc9d5f62.zip
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>
Diffstat (limited to '')
-rw-r--r--kernel/kcov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kcov.c b/kernel/kcov.c
index fc6af9e1308b..d9f9fa9cacc6 100644
--- a/kernel/kcov.c
+++ b/kernel/kcov.c
@@ -62,7 +62,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) {