kcov: remove pointless current != NULL check
PATCH v2 1/1 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.
Signed-off-by Andrey Ryabinin <[email protected]>
Acked-by Dmitry Vyukov <[email protected]>
Acked-by Mark Rutland <[email protected]>
---
Changes since v1:
- Collect acks and drop other patches.
kernel/kcov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/kcov.c +1 -1
@@ -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 ) {
Signature · 1 line
2.13.6