I've got a program that gets stuck in an ioctl -- it uses the TTY
layer along with a custom serial driver for a UART. There's a bug
in there somewhere, but my question is hopefully simpler..

When I run pstack on it, it shows me where it's stuck, but it
also gets it unstuck. Like it served as the interrupt it was
looking for. Having poked at the state of the kernel some,
I'm pretty confident it was hanging on a schedule_timeout() call
with a very long timeout (MAX_SCHEDULE_TIMEOUT). It also called
set_current_state(TASK_INTERRUPTIBLE); right before that.

That might sound like a "hang" per se, but it only happens probably
2 or 3% of the time upon device startup -- so it looks like a race.

So does a pstack walk through and throw an interrupt at each thread?