Skip to content

Commit fcf4eda

Browse files
aryabinintorvalds
authored andcommitted
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>
1 parent 4efb442 commit fcf4eda

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/kcov.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void notrace __sanitizer_cov_trace_pc(void)
6262
* We are interested in code coverage as a function of a syscall inputs,
6363
* so we ignore code executed in interrupts.
6464
*/
65-
if (!t || !in_task())
65+
if (!in_task())
6666
return;
6767
mode = READ_ONCE(t->kcov_mode);
6868
if (mode == KCOV_MODE_TRACE) {

0 commit comments

Comments
 (0)