check_need_resched(): no thread migration in IRQ context

This commit is contained in:
Balazs Gerofi
2015-08-10 12:43:35 +09:00
parent 9ba40dc0ff
commit f4cc82578d

View File

@ -2388,6 +2388,10 @@ void check_need_resched(void)
{
struct cpu_local_var *v = get_this_cpu_local_var();
if (v->flags & CPU_FLAG_NEED_RESCHED) {
if (v->in_interrupt && (v->flags & CPU_FLAG_NEED_MIGRATE)) {
dkprintf("no migration in IRQ context\n");
return;
}
v->flags &= ~CPU_FLAG_NEED_RESCHED;
schedule();
}