From: Tycho Andersen <tycho@tycho.ws>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Serge E . Hallyn" <serge@hallyn.com>
Subject: Re: [PATCH v4] uart: fix race between uart_put_char() and uart_shutdown()
Date: Thu, 12 Jul 2018 12:30:01 -0600 [thread overview]
Message-ID: <20180712183001.GE13192@cisco.cisco.com> (raw)
In-Reply-To: <20180712182545.GA30099@kroah.com>
On Thu, Jul 12, 2018 at 08:25:45PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Jul 12, 2018 at 12:18:46PM -0600, Tycho Andersen wrote:
> > On Thu, Jul 12, 2018 at 05:40:15PM +0200, Greg Kroah-Hartman wrote:
> > > On Thu, Jul 12, 2018 at 09:08:22AM -0600, Tycho Andersen wrote:
> > > > On Thu, Jul 12, 2018 at 05:04:38PM +0200, Greg Kroah-Hartman wrote:
> > > > > On Wed, Jul 11, 2018 at 10:07:44AM -0600, Tycho Andersen wrote:
> > > > > > + if (uport)
> > > > > > + spin_lock_irqsave(&uport->lock, flags);
> > > > >
> > > > > That's the same thing as just calling uart_port_lock(), why aren't you
> > > > > doing that?
> > > >
> > > > Because the compiler can't seem to "see" through the macros/ref calls,
> > > > and I get the warning I mentioned here if I use them:
> > > >
> > > > https://lkml.org/lkml/2018/7/6/840
> > >
> > > What horrible version of gcc are you using that give you that? Don't
> > > open-code things just because of a broken compiler.
> >
> > I've tried with both 7.3.0 and 5.4.0. I think the reason we see this
> > here but not elsewhere in the file is because there's an actual
> > function call (free_page()) in the critical section.
> >
> > If we move that out, something like the below patch, it all works for
> > me.
>
> Ick. Which version of this series had the problem? Let me test it out
> here...
v3, if you remove the initialization of flags from both functions you
should see it.
Tycho
next prev parent reply other threads:[~2018-07-12 18:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 0:01 [PATCH] uart: fix race between uart_put_char() and uart_shutdown() Tycho Andersen
2018-06-05 3:59 ` Serge E. Hallyn
2018-06-06 21:42 ` Tycho Andersen
2018-06-28 12:05 ` Greg Kroah-Hartman
2018-06-29 10:24 ` [PATCH v2] " Tycho Andersen
2018-06-29 16:43 ` Tycho Andersen
2018-07-06 14:39 ` Greg Kroah-Hartman
2018-07-06 16:24 ` [PATCH v3] " Tycho Andersen
2018-07-06 16:49 ` Andy Shevchenko
2018-07-06 18:39 ` Tycho Andersen
2018-07-06 20:48 ` Andy Shevchenko
2018-07-06 21:22 ` Tycho Andersen
2018-07-11 16:07 ` [PATCH v4] " Tycho Andersen
2018-07-11 19:24 ` Serge E. Hallyn
2018-07-11 19:49 ` Serge E. Hallyn
2018-07-11 20:00 ` Tycho Andersen
2018-07-12 15:05 ` Greg Kroah-Hartman
2018-07-12 9:03 ` Andy Shevchenko
2018-07-12 14:13 ` Tycho Andersen
2018-07-12 15:04 ` Greg Kroah-Hartman
2018-07-12 15:08 ` Tycho Andersen
2018-07-12 15:40 ` Greg Kroah-Hartman
2018-07-12 18:18 ` Tycho Andersen
2018-07-12 18:18 ` Tycho Andersen
2018-07-12 18:25 ` Greg Kroah-Hartman
2018-07-12 18:30 ` Tycho Andersen [this message]
2018-07-13 9:28 ` Greg Kroah-Hartman
2018-07-13 14:01 ` Tycho Andersen
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=20180712183001.GE13192@cisco.cisco.com \
--to=tycho@tycho.ws \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=serge@hallyn.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.