From: Greg KH <greg@kroah.com>
To: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Cc: stable@kernel.org, Breno Leitao <leitao@linux.vnet.ibm.com>,
lucaskt@linux.vnet.ibm.com, Alan Cox <alan@linux.intel.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: jsm: remove buggy write queue
Date: Thu, 22 Sep 2011 15:38:09 -0700 [thread overview]
Message-ID: <20110922223809.GA21159@kroah.com> (raw)
In-Reply-To: <20110913175522.GB3592@oc1711230544.ibm.com>
On Tue, Sep 13, 2011 at 02:55:23PM -0300, Thadeu Lima de Souza Cascardo wrote:
> jsm uses a write queue that copies from uart_core circular buffer. This
> copying however has some bugs, like not wrapping the head counter. Since
> this write queue is also a circular buffer, the consumer function is
> ready to use the uart_core circular buffer directly.
>
> This buggy copying function was making some bytes be dropped when
> transmitting to a raw tty, doing something like this.
>
> [root@hostname ~]$ cat /dev/ttyn1 > cascardo/dump &
> [1] 2658
> [root@hostname ~]$ cat /proc/tty/drivers > /dev/ttyn0
> [root@hostname ~]$ cat /proc/tty/drivers
> /dev/tty /dev/tty 5 0 system:/dev/tty
> /dev/console /dev/console 5 1 system:console
> /dev/ptmx /dev/ptmx 5 2 system
> /dev/vc/0 /dev/vc/0 4 0 system:vtmaster
> jsm /dev/ttyn 250 0-31 serial
> serial /dev/ttyS 4 64-95 serial
> hvc /dev/hvc 229 0-7 system
> pty_slave /dev/pts 136 0-1048575 pty:slave
> pty_master /dev/ptm 128 0-1048575 pty:master
> unknown /dev/tty 4 1-63 console
> [root@hostname ~]$ cat cascardo/dump
> /dev/tty /dev/tty 5 0 system:/dev/tty
> /dev/console /dev/console 5 1 system:console
> /dev/ptmx /dev/ptmx 5 2 system
> /dev/vc/0 /dev/vc/0 4 0 system:vtmaste[root@hostname ~]$
>
> This patch drops the driver write queue entirely, using the circular
> buffer from uart_core only.
>
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
> ---
>
> Hello, Greg.
>
> This should probably go to 3.1 and stable releases, since it fixes a
> bug.
I already have this in my tree queued up for 3.2, so please remind me of
this when it hits Linus's tree during the 3.2 merge window.
thanks,
greg k-h
prev parent reply other threads:[~2011-09-22 23:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 16:14 [PATCH 1/3] jsm: remove remaining flip buffer code Thadeu Lima de Souza Cascardo
2011-08-24 16:14 ` [PATCH 2/3] jsm: remove buggy write queue Thadeu Lima de Souza Cascardo
2011-08-24 16:14 ` [PATCH 3/3] jsm: print byte we are dequeing Thadeu Lima de Souza Cascardo
2011-09-13 17:55 ` jsm: remove buggy write queue Thadeu Lima de Souza Cascardo
2011-09-22 22:38 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110922223809.GA21159@kroah.com \
--to=greg@kroah.com \
--cc=alan@linux.intel.com \
--cc=cascardo@linux.vnet.ibm.com \
--cc=leitao@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lucaskt@linux.vnet.ibm.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).