Re: [bug report] serial: 8250: fix handle_irq locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx

Johan



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux