From: Sasha Levin <sasha.levin@oracle.com>
To: Corey Wright <undefined@pobox.com>
Cc: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>, stable@vger.kernel.org
Subject: Re: commit af32cc7b causes stalls on 3.18.23
Date: Sat, 31 Oct 2015 09:02:52 -0400 [thread overview]
Message-ID: <5634BBFC.7020401@oracle.com> (raw)
In-Reply-To: <20151031003712.ac36df024c4949639ed0495a@pobox.com>
On 10/31/2015 01:37 AM, Corey Wright wrote:
> On Fri, 30 Oct 2015 22:07:24 -0400
> Sasha Levin <sasha.levin@oracle.com> wrote:
>
>> > On 10/30/2015 09:56 PM, Corey Wright wrote:
>>> > > Running applications under GNU Screen causes the 3.18.23 kernel to stall and
>>> > > the application to hang. Reverting commit af32cc7b, ie "tty: fix stall caused
>>> > > by missing memory barrier in drivers/tty/n_tty.c", fixes the problem.
>> >
>> > Hi Corey,
>> >
>> > Does doing the same on mainline work for you?
> is 4.1.12 close enough (which i already had "on-hand")?
>
> it contains a similar commit 614ea4ea and tests successfully (ie no bug).
>
> so the problem appears to be limited to 3.18.23.
>
> thanks for getting me looking at and comparing the two versions!
>
> in 3.18.23 we add a spin_unlock_irqrestore inside the "if (tty->link->packet)"
> block, but we already have one outside of the if block.
>
> i'm thinking it accidentally got dragged along when porting the commit from
> 4.1 to 3.18 (because the one that was added in 3.18.23 is in the same location
> as the one already in 4.1).
>
> the below patch fixes the problem and passes the
> apt-and-lxc-start-run-under-screen-without-causing-a-stall test.
>
> ---------- >8 ----- cut here ----- 8< ----------
> Remove extraneous, unmatched spin_unlock_irqrestore() introduced by commit
> af32cc7b.
>
> This prevents stalls when running command-line applications under GNU Screen.
>
> Fixes: af32cc7bde63 ("tty: fix stall caused by missing memory barrier in drivers/tty/n_tty.c")
> Signed-off-by: Corey Wright <undefined@pobox.com>
>
> --- linux-3.18.23~/drivers/tty/n_tty.c 2015-10-30 23:46:48.000000000 -0500
> +++ linux-3.18.23/drivers/tty/n_tty.c 2015-10-30 23:46:53.821376173 -0500
> @@ -364,7 +364,6 @@ static void n_tty_packet_mode_flush(stru
> spin_lock_irqsave(&tty->ctrl_lock, flags);
> if (tty->link->packet) {
> tty->ctrl_status |= TIOCPKT_FLUSHREAD;
> - spin_unlock_irqrestore(&tty->ctrl_lock, flags);
> wake_up_interruptible(&tty->link->read_wait);
> }
> spin_unlock_irqrestore(&tty->ctrl_lock, flags);
Hey Corey,
Thanks for looking into it!
I've pushed a corrected backport to the stable queue, if you could please confirm
that it works for you I'll ship it as 3.18.24.
The tree is available at git://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git linux-3.18.y-queue
Thanks again!
next prev parent reply other threads:[~2015-10-31 13:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-31 1:56 commit af32cc7b causes stalls on 3.18.23 Corey Wright
2015-10-31 2:07 ` Sasha Levin
2015-10-31 5:37 ` Corey Wright
2015-10-31 8:47 ` Kosuke Tatsukawa
2015-10-31 13:02 ` Sasha Levin [this message]
2015-10-31 18:42 ` Corey Wright
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=5634BBFC.7020401@oracle.com \
--to=sasha.levin@oracle.com \
--cc=stable@vger.kernel.org \
--cc=tatsu@ab.jp.nec.com \
--cc=undefined@pobox.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.