sleep_on() DIE DIE DIE (was Re: [patch] Fix suspend of the kseriod thread)

David Woodhouse (dwmw2@infradead.org)
Wed, 31 Jul 2002 12:44:52 +0100


vojtech@suse.cz said:
> On Wed, Jul 31, 2002 at 11:07:21AM +0100, David Woodhouse wrote:
> > vojtech@suse.cz said:
> > > Ok. Is the use in drivers/input/serio.c buggy?
> >
> > If it matters that the thread can miss wakeup events and sleep
> > indefinitely while there's a 'SERIO_RESCAN' event pending, then
> > yes it looks buggy.
<...>
> Thanks for the explanation. Yes, this could happen.

Quod Erat Demonstrandum.

Even people who can be assumed to have a clue can make the mistake of using
sleep_on() in spite of the fact that it's almost impossible to use
correctly.

It can be removed from 2.5 without much pain -- half the drivers are broken
anyway due to the removal of cli(). I'm running a kernel with sleep_on()
removed quite happily.

At Stephen's request, I'll wait a couple of days for ext3 to remove all use
of sleep_on() before submitting the patch. NFS wants fixing too, but other
than that the breakage seems remarkably slight.

--
dwmw2

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