linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "andrew mcgregor" <andrew.mcgregor@alliedtelesis.co.nz>
To: "Ilya Zykov" <ilya@ilyx.ru>, "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: Add driver unthrottle in ioctl(...,TCFLSH,..).
Date: Thu, 22 Nov 2012 13:47:15 +1300	[thread overview]
Message-ID: <50AE2CE30200003600026B9A@gwia.alliedtelesyn.co.nz> (raw)
In-Reply-To: <50AD4A01.7060500@ilyx.ru>



>>> On 11/22/2012 at 10:39 AM, in message <50AD4A01.7060500@ilyx.ru>, Ilya Zykov
<ilya@ilyx.ru> wrote: 
> On 22.11.2012 1:30, Alan Cox wrote:
> >> Function reset_buffer_flags() also invoked during the
> >> ioctl(...,TCFLSH,..). At the time of request we can have full buffers
> >> and throttled driver too. If we don't unthrottle driver, we can get
> >> forever throttled driver, because after request, we will have
> >> empty buffers and throttled driver and there is no place to unthrottle 
> driver.
> >> It simple reproduce with "pty" pair then one side sleep on tty->write_wait,
> >> and other side do ioctl(...,TCFLSH,..). Then there is no place to do 
> writers wake up.
> >
> >
> > So instead of revertng it why not just fix it ? Just add an argument to
> > the reset_buffer_flags function to indicate if unthrottling is permitted.
> >
> > Alan
> >
> Because in my opinion, unthrottling permitted always, except release 
> last filp (tty->count == 0)

Maybe so, but the patch was there in the first place to resolve an actual observed bug, where a driver would lock up.  So the behaviour needs preserved.

Andrew


  reply	other threads:[~2012-11-22 19:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 21:12 [PATCH] tty: Add driver unthrottle in ioctl(...,TCFLSH,..) Ilya Zykov
2012-11-21 21:30 ` Alan Cox
2012-11-21 21:39   ` Ilya Zykov
2012-11-22  0:47     ` andrew mcgregor [this message]
2012-11-22  4:29       ` Ilya Zykov
2012-11-22  5:25         ` andrew mcgregor
2012-11-22  6:35           ` Ilya Zykov
2012-11-22  6:03         ` Ilya Zykov
2012-11-22  6:16           ` Ilya Zykov
2012-11-21 21:55   ` Ilya Zykov
2012-11-27  6:14 [PATCH v4] " Ilya Zykov
2012-11-27 17:24 ` Greg Kroah-Hartman
2012-11-27 18:46   ` Ilya Zykov
2012-11-27 19:32     ` Alan Cox
2013-01-16  9:07       ` [PATCH] " Ilya Zykov

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=50AE2CE30200003600026B9A@gwia.alliedtelesyn.co.nz \
    --to=andrew.mcgregor@alliedtelesis.co.nz \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilya@ilyx.ru \
    --cc=linux-kernel@vger.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).