Re: Deadlock in serial driver 2.6.x

From: Alan Cox
Date: Thu Feb 03 2005 - 06:42:32 EST


On Llu, 2005-01-31 at 08:48, Andrew Morton wrote:
> > The tty layer cannot fix this for now, and I don't intend to fix it. Fix
> > the serial driver: the fix is quite simple since you can keep a field in
> > the driver for now to detect recursive calling into the echo case and
> > don't relock.
>
> Are we sure that the serial driver is the only one which will hit this
> deadlock?

Yes fairly sure. The feature has been a well known but non-documented
property of the tty layer since about 1.0. There are two ways I see to
clean it up - we
can have the serial driver behave like other drivers and if need be
known about
recursive entries or we could extend the driver interface with an "echo"
method used by line disciplines when calling back to the tty driver from
a data
receive event.

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/