This has the problem that it can delay the actual hangup indefinitely, ie
until after somebody releases the tty anyway. So you won't race, but you
also won't actually ever handle hangup events correctly (the particular
crashme test-case that has been discussed in this context doesn't care,
but a lot of other cases _do_ care that hangup events happen "quickly"
(they don't have to happen immediately, they just have to happen in a
reasonably timely fashion).
Anyway, for the pty case this is a non-issue, because it really should be
done synchronously anyway, but for other events it should be enough to
just move the run_task_queue() in the scheduler to the top of the
function.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/