public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>, gregkh@linuxfoundation.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Jiri Slaby (SUSE)" <jirislaby@kernel.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Thomas Gleixner <tglx@linutronix.de>,
	Petr Mladek <pmladek@suse.com>
Subject: Re: [PATCH] serial: 8250: drop lockdep annotation from serial8250_clear_IER()
Date: Mon, 14 Aug 2023 08:21:32 +0206	[thread overview]
Message-ID: <878rae175n.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20230811064340.13400-1-jirislaby@kernel.org>

On 2023-08-11, "Jiri Slaby (SUSE)" <jirislaby@kernel.org> wrote:
> The port lock is not always held when calling serial8250_clear_IER().
> When an oops is in progress, the lock is tried to be taken and when it
> is not, a warning is issued:

Yes, and that is a potential deadlock. The warning is correct.

> Therefore, remove the annotation as it doesn't hold for all invocations.

... because those invocations are broken by design.

> The other option would be to make the lockdep test conditional on
> 'oops_in_progress' or pass 'locked' from serial8250_console_write(). I
> don't think, that is worth it.

The proper thing to do is to fix the invocation. The upcoming atomic
console implementation for the 8250 does exactly that.

If this patch gets accepted (which it appears it will be), I will revert
it in my series implementing the 8250 atomic console.

John Ogness

  reply	other threads:[~2023-08-14  6:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  6:43 [PATCH] serial: 8250: drop lockdep annotation from serial8250_clear_IER() Jiri Slaby (SUSE)
2023-08-14  6:15 ` John Ogness [this message]
2023-08-14  6:28   ` Jiri Slaby
2023-08-14  8:15     ` John Ogness
2023-08-14 10:00       ` Petr Mladek
2023-08-14 10:21         ` Jiri Slaby
2023-08-15  9:27           ` Petr Mladek
2023-08-15 10:10             ` Jiri Slaby

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=878rae175n.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=vbabka@suse.cz \
    /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