Messages in this thread | | | Date | Sun, 17 Dec 2000 19:23:51 +0100 | From | Jamie Lokier <> | Subject | Re: 2.4.0-test13-pre1 lockup: run_task_queue or tty_io are wrong |
| |
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/
| |