> From: "Theo de Raadt" <dera...@openbsd.org>
> Date: Thu, 10 Jan 2019 10:23:27 -0700
> 
> Ted Unangst <t...@tedunangst.com> wrote:
> 
> > Ted Unangst wrote:
> > > 
> > > Does 0xffff come from ACPI? Can we give that a name?
> > > 
> > > I thought sleeping for one tick is kinda weird, but I see what
> > > it's doing with the acpi_dotask loop. This feels precarious, but
> > > whatever.
> > 
> > So upon further thought, this is pretty bad. If the new task also
> > calls sem wait, we'll end up back here, recursing on the event
> > loop. And of course, the first sem can't wakeup until after the
> > second one does. If you want to say it was like this when you got
> > here, ok, but pretending to pause like this is troublesome. There
> > was a bug in libc rpc code where it tried to do something similar
> > and blew up the stack.
> 
> Not sure I understand.  There is only one acpi task.  

No there can be many acpi tasks, so there is indeed a risk.  But we
have to allow other acpi tasks to run while we're blocked on the
semaphore otherwise we'll never wake up!

Reply via email to