[<prev] [next>] [day] [month] [year] [list]
Message-ID: <345838865.5722597.1417810607255.JavaMail.yahoo@jws10603.mail.bf1.yahoo.com>
Date: Fri, 5 Dec 2014 20:16:47 +0000 (UTC)
From: Denis Du <dudenis2000@...oo.ca>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"jslaby@...e.cz" <jslaby@...e.cz>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: TTY layer need a lock to copy data to user space
Hi, Guys:
It was found that the 3.12 kernel tty layer will lose or corrupt data when have a full-duplex communication, especcially in high baudrate, for example 230k for my OMAP5 uart. Eventually I found there is lock missing between copy data to ldisc layer buffer and copy data from the same buffer to user
space. I believe this issue existed since 3.8 kernel(since this kernel , it start to remove most of the spin-locks) and I didn't find any fix even through 3.17 kernel. This patch was tested to be works great with no any data loss again.
I did try to use the existed lock atomic_read_lock, but it doesn’t work.
Denis Du
View attachment "Fix-serial-lose-data-by-newlock.patch" of type "text/x-patch" (1999 bytes)
Powered by blists - more mailing lists