fault-inject: use correct check for interrupts
Subsystems (3)
PATCH 1/1 fault-inject: 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.
---
Andrew, do you mind taking this to mm?
--- lib/fault-inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/fault-inject.c +1 -1
@@ -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
Signature · 7 lines
2.12.1.500.gab5fba24ee-goog -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <[email protected]>:
Quoted 9 lines
in_interrupt()also returns true when bh is disabled in task context. That's not whatfail_task()wants to check.
Use the newin_task()predicate that does the right thing.Signed-off-by Dmitry Vyukov <[email protected]>Cc Andrew Morton <[email protected]>
This change looks good to me.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 11 lines · Akinobu Mita
2017-03-21 18:18 GMT+09:00 Dmitry Vyukov <[email protected]>:
Quoted 9 lines
in_interrupt()also returns true when bh is disabled in task context. That's not whatfail_task()wants to check.
Use the newin_task()predicate that does the right thing.Signed-off-by Dmitry Vyukov <[email protected]>Cc Andrew Morton <[email protected]>
Quoted 3 lines
This change looks good to me.
Reviewed-by Akinobu Mita <[email protected]>
Andrew, will you take this to mm please?
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>