Re: [PATCH] TTY: Fix loss of echoed characters (2nd follow-on PATCHattached)

From: Alan Cox
Date: Tue Sep 09 2008 - 09:12:42 EST


> I don't think this is a good idea either, since I don't want to spinlock
> during the output processing, which calls the driver output func. I
> think a mutex is more appropriate anyway (and there are some already
> defined and in use for tty write locking, etc.) - let me know if you
> think otherwise. I will play around with this and re-post a patch for
> review soon.

The driver output side can sleep, and it has to be able to sleep because
the drivers like USB need to be able to sleep.

If you have the column handling isolated and locked that is a big step
towards exterminating the BKL in the n_tty code. It also illustrates why
locking people always say "lock data not code".

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