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

Robert Love (rml@tech9.net)
04 Apr 2002 18:07:47 -0500


On Thu, 2002-04-04 at 17:42, Linus Torvalds wrote:

> My current tree says
>
> asmlinkage void preempt_schedule(void)
> {
> if (unlikely(preempt_get_count()))
> return;
> if (current->state != TASK_RUNNING)
> return;
> schedule();
> }

You need to do the same thing in entry.S ... Ingo decoupled the two
entry paths from each other (entry.S does preempt_schedule's work on its
own, and then directly calls schedule).

So, right now the ret_from_intr path sets the task state to
TASK_RUNNING. That needs to be replaced with a jump out if it is NOT
task running.

Curiously, what is wrong with the way we did it in the original patch?
I.e. set a bit in preempt_count and use that to skip to pick_next_task
in schedule. This allows us to preempt any task of any state ...

Robert Love

-
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/