[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090717170124.05881456@lxorguk.ukuu.org.uk>
Date: Fri, 17 Jul 2009 17:01:24 +0100
From: Alan Cox <alan@...rguk.ukuu.org.uk>
To: Jeff Harris <jeff_harris@...trox.com>
Cc: alan@...ux.intel.com, vapier@...too.org, adobriyan@...il.com,
linux-kernel@...r.kernel.org, Jeff Harris <jeff_harris@...trox.com>
Subject: Re: [PATCH] tty: Fix tcdrain hang due to tty chars_in_buffer errors
On Fri, 17 Jul 2009 11:07:54 -0400
Jeff Harris <jeff_harris@...trox.com> wrote:
> If a tty driver's chars_in_buffer callback reports an error, the wait loop in
chars_in_buffer cannot report an error. It reports how many characters
are in the buffer.
> A process calling tcdrain will block indefinitely if it calls tcdrain when the
> device is disconnected.
Fix your chars_in_buffer. On a disconnect its quite reasonable to return
0, as they are not buffered any more.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists