linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH 1/2] serial: core: fix port-lock initialisation
Date: Thu, 10 Sep 2020 09:08:36 +0200	[thread overview]
Message-ID: <20200910070836.GB24441@localhost> (raw)
In-Reply-To: <20200909152158.GC1891694@smile.fi.intel.com>

On Wed, Sep 09, 2020 at 06:21:58PM +0300, Andy Shevchenko wrote:
> On Wed, Sep 09, 2020 at 04:31:00PM +0200, Johan Hovold wrote:
> > Commit f743061a85f5 ("serial: core: Initialise spin lock before use in
> > uart_configure_port()") tried to work around a breakage introduced by
> > commit a3cb39d258ef ("serial: core: Allow detach and attach serial
> > device for console") by adding a second initialisation of the port lock
> > when registering the port.
> > 
> > As reported by the build robots [1], this doesn't really solve the
> > regression introduced by the console-detach changes and also adds a
> > second redundant initialisation of the lock for normal ports.
> 
> I thought, though doubtfully, it was a regression made by
> 679193b7baf8 ("serial: 8250: Let serial core initialise spin lock")
> and then I completely forgot about [1].

Yes, that driver has had an explicit early initialisation of the lock
and it was indeed the removal of that which triggered the robot's
report. With the initialisation again done during console setup (patch
2/2), that should no longer be an issue (at least not for the console
port...).

> > Start cleaning up this mess by removing the redundant initialisation and
> > making sure that the port lock is again initialised once-only for ports
> > that aren't already in use as a console.
> 
> Thanks for looking into this!
> 
> I agree this is better place for lock initialization.
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks for reviewing.

Johan

  parent reply	other threads:[~2020-09-10  7:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 14:30 [PATCH 0/2] serial: core: fix console port-lock regression Johan Hovold
2020-09-09 14:31 ` [PATCH 1/2] serial: core: fix port-lock initialisation Johan Hovold
     [not found]   ` <20200909152158.GC1891694@smile.fi.intel.com>
2020-09-10  7:08     ` Johan Hovold [this message]
2020-09-09 14:31 ` [PATCH 2/2] serial: core: fix console port-lock regression Johan Hovold
     [not found]   ` <20200909154815.GD1891694@smile.fi.intel.com>
2020-09-10  7:35     ` Johan Hovold
2020-09-10  9:27       ` Andy Shevchenko
2020-09-10 11:10         ` Johan Hovold
2020-09-14  8:09         ` Tony Lindgren
2020-09-16 12:23           ` Andy Shevchenko
2020-09-18  7:16             ` Tony Lindgren

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=20200910070836.GB24441@localhost \
    --to=johan@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=stable@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).