[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 08 Aug 2007 09:52:55 -0500
From: Paul Fulghum <paulkf@...rogate.com>
To: Laurent Pinchart <laurentp@...-semaphore.com>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>, linux-kernel@...r.kernel.org
Subject: Re: Serial buffer memory leak
On Wed, 2007-08-08 at 16:28 +0200, Laurent Pinchart wrote:
> The patch fixes the problem (at least under the test conditions that lead me
> to discover it in the first place). Thanks Alan.
It works here also, but I see a problem.
By deferring the flush, ioctl(TCFLSH) returns immediately
even though there is possibly still receive data being fed
to the ldisc.
If this is followed immediately by a read() then the
application gets unexpected (stale) data defeating the
purpose of the TCFLSH.
tty_buffer_flush() needs to wait for buf.flushpending to clear.
--
Paul Fulghum
Microgate Systems, Ltd
-
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