From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Ilya Zykov <ilya@ilyx.ru>
Cc: Andrew McGregor <andrew.mcgregor@alliedtelesis.co.nz>,
Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tty: Add driver unthrottle in ioctl(...,TCFLSH,..).
Date: Fri, 23 Nov 2012 13:53:33 +0000 [thread overview]
Message-ID: <20121123135333.6b7a87f1@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <50AEAF20.3070001@ilyx.ru>
On Fri, 23 Nov 2012 03:02:56 +0400
Ilya Zykov <ilya@ilyx.ru> wrote:
> Regression 'tty: fix "IRQ45: nobody cared"'
> Regression commit 7b292b4bf9a9d6098440d85616d6ca4c608b8304
>
> 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.
>
> About 'tty: fix "IRQ45: nobody cared"':
> We don't call tty_unthrottle() if release last filp - ('tty->count == 0')
> In other case it must be safely.
>
> Unfortunately, many drivers indirectly invoke tty_unthrottle() before TTY LAYER
> decremented (tty->count).
> This Patch help us catch bugs in tty's drivers and invoke tty_unthrottle()
> in right moment only.
This isn't really what I meant by fixing the problem. Simply declaring
the known universe to disagree with your view and adding a WARN isn't a
fix.
Alan
prev parent reply other threads:[~2012-11-23 13:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 23:02 Ilya Zykov
2012-11-22 23:11 ` Ilya Zykov
2012-11-23 13:53 ` Alan Cox [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=20121123135333.6b7a87f1@pyramind.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=alan@linux.intel.com \
--cc=andrew.mcgregor@alliedtelesis.co.nz \
--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
all inboxes | Powered by JetHome®