mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
sched: Check for idle task in might_sleep()
Idle is not allowed to call sleeping functions ever! Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
77177856e3
commit
db273be2a7
1 changed files with 2 additions and 1 deletions
|
|
@ -6927,7 +6927,8 @@ void __might_sleep(const char *file, int line, int preempt_offset)
|
|||
static unsigned long prev_jiffy; /* ratelimiting */
|
||||
|
||||
rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */
|
||||
if ((preempt_count_equals(preempt_offset) && !irqs_disabled()) ||
|
||||
if ((preempt_count_equals(preempt_offset) && !irqs_disabled() &&
|
||||
!is_idle_task(current)) ||
|
||||
system_state != SYSTEM_RUNNING || oops_in_progress)
|
||||
return;
|
||||
if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy)
|
||||
|
|
|
|||
Loading…
Reference in a new issue