|
@@ -70,7 +70,7 @@ static int kthread(void *_create)
|
|
data = create->data;
|
|
data = create->data;
|
|
|
|
|
|
/* OK, tell user we're spawned, wait for stop or wakeup */
|
|
/* OK, tell user we're spawned, wait for stop or wakeup */
|
|
- __set_current_state(TASK_INTERRUPTIBLE);
|
|
|
|
|
|
+ __set_current_state(TASK_UNINTERRUPTIBLE);
|
|
complete(&create->started);
|
|
complete(&create->started);
|
|
schedule();
|
|
schedule();
|
|
|
|
|
|
@@ -162,7 +162,10 @@ EXPORT_SYMBOL(kthread_create);
|
|
*/
|
|
*/
|
|
void kthread_bind(struct task_struct *k, unsigned int cpu)
|
|
void kthread_bind(struct task_struct *k, unsigned int cpu)
|
|
{
|
|
{
|
|
- BUG_ON(k->state != TASK_INTERRUPTIBLE);
|
|
|
|
|
|
+ if (k->state != TASK_UNINTERRUPTIBLE) {
|
|
|
|
+ WARN_ON(1);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
/* Must have done schedule() in kthread() before we set_task_cpu */
|
|
/* Must have done schedule() in kthread() before we set_task_cpu */
|
|
wait_task_inactive(k);
|
|
wait_task_inactive(k);
|
|
set_task_cpu(k, cpu);
|
|
set_task_cpu(k, cpu);
|