From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Cox Subject: Re: [PATCH] tty: Correct tty buffer flushing. Date: Tue, 4 Dec 2012 08:53:59 +0000 Message-ID: <20121204085359.03894026@bob.linux.org.uk> References: <50B55A93.4090900@ilyx.ru> <50B6A652.9000107@ilyx.ru> <20121129135418.4237e7f8@pyramind.ukuu.org.uk> <50B76D96.20809@ilyx.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com ([192.55.52.88]:55209 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388Ab2LDIvh (ORCPT ); Tue, 4 Dec 2012 03:51:37 -0500 In-Reply-To: <50B76D96.20809@ilyx.ru> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Ilya Zykov Cc: Alan Cox , Xiaobing Tu , Jiri Slaby , Alek Du , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org > Main idea here - we never flash last (struct tty_buffer) in the > active buffer. Only data for ldisc. (tty->buf.head->read = > tty->buf.head->commit). At that moment driver can collect(write) data > in buffer without conflict. This one I agree with (sorry it took a while to get to, I wanted to sit and think carefully about it as it is subtle and clever) Can you generate a single patch which reverts the unneeded locks and adds this instead. Add a Signed-off-by and send it to Greg to get it into 3.8/3.9 somewhere. Thanks Alan