From: Dmitry Vyukov Date: Mon, 8 May 2017 22:56:51 +0000 (-0700) Subject: lib/fault-inject.c: use correct check for interrupts X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f2ad37da805414e9385e7ca2961e1d0431df3799;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git lib/fault-inject.c: use correct check for interrupts in_interrupt() also returns true when bh is disabled in task context. That's not what fail_task() wants to check. Use the new in_task() predicate that does the right thing. Link: http://lkml.kernel.org/r/20170321091805.140676-1-dvyukov@google.com Signed-off-by: Dmitry Vyukov Reviewed-by: Akinobu Mita Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/fault-inject.c b/lib/fault-inject.c index 6a823a53e357..4ff157159a0d 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c @@ -56,7 +56,7 @@ static void fail_dump(struct fault_attr *attr) static bool fail_task(struct fault_attr *attr, struct task_struct *task) { - return !in_interrupt() && task->make_it_fail; + return in_task() && task->make_it_fail; } #define MAX_STACK_TRACE_DEPTH 32