From: Johan Hovold <johan@kernel.org>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [bug report] serial: 8250: fix handle_irq locking
Date: Mon, 27 Feb 2023 09:52:21 +0100 [thread overview]
Message-ID: <Y/xvRQSmS67sv2cL@hovoldconsulting.com> (raw)
In-Reply-To: <Y/xYzqp4ogmOF5t0@kili>
On Mon, Feb 27, 2023 at 10:16:30AM +0300, Dan Carpenter wrote:
> Hello Johan Hovold,
>
> The patch 853a9ae29e97: "serial: 8250: fix handle_irq locking" from
> Jul 14, 2021, leads to the following Smatch static checker warning:
>
> drivers/tty/serial/8250/8250_fsl.c:84 fsl8250_handle_irq() warn: inconsistent returns 'flags'.
> Locked on : 38,46
> Unlocked on: 84
>
> drivers/tty/serial/8250/8250_fsl.c
> 26 int fsl8250_handle_irq(struct uart_port *port)
> 27 {
> 28 unsigned long flags;
> 29 u16 lsr, orig_lsr;
> 30 unsigned int iir;
> 31 struct uart_8250_port *up = up_to_u8250p(port);
> 32
> 33 spin_lock_irqsave(&up->port.lock, flags);
> ^^^^^
> 34
> 35 iir = port->serial_in(port, UART_IIR);
> 36 if (iir & UART_IIR_NO_INT) {
> 37 spin_unlock(&up->port.lock);
> 38 return 0;
>
> Needs to enable IRQs again. Same below etc.
Thanks, Dan. I just sent a fix here:
https://lore.kernel.org/r/20230227085046.24282-1-johan@kernel.org
Johan
prev parent reply other threads:[~2023-02-27 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 7:16 [bug report] serial: 8250: fix handle_irq locking Dan Carpenter
2023-02-27 8:52 ` Johan Hovold [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=Y/xvRQSmS67sv2cL@hovoldconsulting.com \
--to=johan@kernel.org \
--cc=error27@gmail.com \
--cc=linux-serial@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