lib/fault-inject.c: use correct check for interrupts
Subsystems (2)
[email protected]
maintainerPATCH 46/114 lib/fault-inject.c: use correct check for interrupts
From: Dmitry Vyukov <[email protected]>
Subject: 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.
Signed-off-by Dmitry Vyukov <[email protected]>
Reviewed-by Akinobu Mita <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
lib/fault-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fault-inject.c renamed from lib/fault-inject.c~fault-inject-use-correct-check-for-interrupts +1 -1
@@ -56,7 +56,7 @@ static void fail_dump(struct fault_attrstatic 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
_