Re: [PATCH] kdesu broken

From: Alan Cox
Date: Wed Jul 29 2009 - 07:17:48 EST


> IOW, the whole argument really hinges on the fact that calling
> flush_to_ldisc() manually (without any locking) is really not
> fundamentally any different from the delayed work doing it from a timer.

Which means the hangup path should be doing a cancel_delayed_work() in
the case where its not resetting the termios as well and since it isn't
you can't actually (fingers crossed) make the problem worse, its merely as
broken as before.

Ok

> And when we _do_ disable the timer, we also make that flush_to_ldisc()
> function be a no-op, so the "tty_ldisc_halt()" effectively stops both the
> timer and (conceptually) the manual call case too.
>
> So now we have one remaining case, namely the case of the ldisc then being
> re-initialized and TTY_LDISC is set again. But at that point, calling
> flush_to_ldisc() had better be ok again, wouldn't you agree?

The ldisc re-init via SETD should be fine as it locks versus hangup
anyway and always has to.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/