Re: [PATCH] kdesu broken

From: Alan Cox
Date: Wed Jul 29 2009 - 12:39:46 EST


> tty_ldisc_deref(ld);
> + tty_ldisc_halt(tty);
> + tty_ldisc_wait_idle(tty);

Needs to be
mutex_lock(&tty->ldisc_mutex);
if (tty->ldisc)
....
}
mutex_unlock(&tty->ldisc_mutex)

We can't wait for the reference to go away if we hold one, and if we
don't hold one the ldisc reference might go away during the hangup if we
close()

Odds of hitting it minimal however. Or maybe we need a smarter
tty_ldisc_wait_self_idle(ld) ?

--
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/