Re: 2.4.0-test13-pre1 lockup: run_task_queue or tty_io are wrong

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Sun Dec 17 2000 - 13:23:51 EST


Linus Torvalds wrote:
> Ho humm. I'll have to check what the proper fix is. Right now the rule is
> that nobody can _ever_ remove himself from a task queue, although there is
> one bad user that does exactly that, and that means that it should be ok
> to just cache the "next" pointer in run_task_queue(), and make it look
> something like

How about using a sentinel list entry representing the current position
in run_task_queue's loop?

The sentinel's next pointer isn't invalidated by other operations on the
list, provided each operation is protected by tqueue_lock. Each
iteration step is a matter or removing the sentinel, and inserting it in
the next position. A task removing itself would then be perfectly ok.

-- Jamie
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Dec 23 2000 - 21:00:19 EST