]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ksoftirqd: missing barrier
authorAndrew Morton <akpm@osdl.org>
Thu, 1 Apr 2004 05:51:39 +0000 (21:51 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 1 Apr 2004 05:51:39 +0000 (21:51 -0800)
Spotted by Andrea: we need the barriers in there to prevent reads passing
ahead of the setting of current->state.

kernel/softirq.c

index e825e21fa49577bd9e51697f9fff85f8b4d01903..81c79736ff9eed325d34644dfd6750048bacc879 100644 (file)
@@ -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;