kcov: simplify interrupt check
authorDmitry Vyukov <[email protected]>
Mon, 8 May 2017 22:56:48 +0000 (15:56 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 May 2017 00:15:12 +0000 (17:15 -0700)
commitf61e869d519c0c11a8d80a503cfdfb4897df855a
tree4befe4405314621e224b7118b42632364dc9be52
parent8c733420bdd5a6cc2d8540fb5aa32d1fbf3cb3ff
kcov: simplify interrupt check

in_interrupt() semantics are confusing and wrong for most users as it
also returns true when bh is disabled.  Thus we open coded a proper
check for interrupts in __sanitizer_cov_trace_pc() with a lengthy
explanatory comment.

Use the new in_task() predicate instead.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Dmitry Vyukov <[email protected]>
Cc: Kefeng Wang <[email protected]>
Cc: James Morse <[email protected]>
Cc: Alexander Popov <[email protected]>
Cc: Andrey Konovalov <[email protected]>
Cc: Hillf Danton <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
kernel/kcov.c