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

David Woodhouse
2002-07-31T11:41:39Z

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