Commit bc5c1743 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ksoftirqd: missing barrier

Spotted by Andrea: we need the barriers in there to prevent reads passing
ahead of the setting of current->state.
parent e5f64bc8
......@@ -331,7 +331,7 @@ static int ksoftirqd(void * __bind_cpu)
cond_resched();
}
__set_current_state(TASK_INTERRUPTIBLE);
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
return 0;
......@@ -339,10 +339,10 @@ static int ksoftirqd(void * __bind_cpu)
wait_to_die:
preempt_enable();
/* Wait for kthread_stop */
__set_current_state(TASK_INTERRUPTIBLE);
set_current_state(TASK_INTERRUPTIBLE);
while (!kthread_should_stop()) {
schedule();
__set_current_state(TASK_INTERRUPTIBLE);
set_current_state(TASK_INTERRUPTIBLE);
}
__set_current_state(TASK_RUNNING);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment