Re: Patch: linux-2.5.8-pre1/kernel/exit.c change caused BUG() atboot

george anzinger (george@mvista.com)
Thu, 04 Apr 2002 12:02:46 -0800


Dave Hansen wrote:
>
> Robert Love wrote:
> > tsk->exit_code = code;
> > exit_notify();
> > + preempt_enable_no_resched();
> * PREEMPT HERE *
> > schedule();
> > BUG();
>
> Isn't there still a race here? A preempt CAN happen after you reenable,
> right? Admittedly, its a small window, but it _is_ a window.

Right, eliminate this line. Since the task is going away it doesn't
matter. Actually it doesn't matter even if schedule() returns (i.e. for
other than ZOMBIE) as long as preempt is enabled after the schedule()
call, somewhere. It is designed to work this way for a reason, this
being one of them.

-g
>
> --
> Dave Hansen
> haveblue@us.ibm.com
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/