]> git.hungrycats.org Git - linux/commitdiff
do not unlock irqs before calling schedule() - besides being a small exit() speedup...
authorIngo Molnar <mingo@elte.hu>
Wed, 13 Feb 2002 03:45:03 +0000 (04:45 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 13 Feb 2002 03:45:03 +0000 (04:45 +0100)
fixes a preemption race that was introduced by my removal of PREEMPT_ACTIVE.

kernel/exit.c

index 4a36dd9ce05b0cb402c5234236cb82ca58e27828..45214fffb162124487b3a556af4e35eee8bb241b 100644 (file)
@@ -476,7 +476,12 @@ static void exit_notify(void)
                        write_lock_irq(&tasklist_lock);
                }
        }
-       write_unlock_irq(&tasklist_lock);
+       /*
+        * No need to unlock IRQs, we'll schedule() immediately
+        * anyway. In the preemption case this also makes it
+        * impossible for the task to get runnable again.
+        */
+       write_unlock(&tasklist_lock);
 }
 
 NORET_TYPE void do_exit(long code)