Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1201506 > unrolled thread

[PATCHv2 0/2] tty: serial: men_z135_uart.c: Updates for men_z135_uart

Started byJohannes Thumshirn <jthumshirn@suse.de>
First post2015-08-06 09:20 +0200
Last post2015-08-06 13:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCHv2 0/2] tty: serial: men_z135_uart.c: Updates for men_z135_uart Johannes Thumshirn <jthumshirn@suse.de> - 2015-08-06 09:20 +0200
    Re: [PATCHv2 1/2] tty: serial: men_z135_uart.c: Fix race between  IRQ and set_termios() Peter Hurley <peter@hurleysoftware.com> - 2015-08-06 13:30 +0200

#1201506 — [PATCHv2 0/2] tty: serial: men_z135_uart.c: Updates for men_z135_uart

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2015-08-06 09:20 +0200
Subject[PATCHv2 0/2] tty: serial: men_z135_uart.c: Updates for men_z135_uart
Message-ID<pUnD3-1Ok-3@gated-at.bofh.it>
Version two of the updates for the men_z135_uart, incorporating Peter's review
comments.

1/2: Use spin_lock_irq() in settermios() and spin_lock() in ISR to avoid
     deadlocks.
2/2: Removes the double initialization of the port.lock spinlock.

Johannes Thumshirn (2):
  tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios()
  tty: serial: men_z135_uart.c: Don't initialize port->lock

 drivers/tty/serial/men_z135_uart.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

-- 
2.4.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1201660 — Re: [PATCHv2 1/2] tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios()

FromPeter Hurley <peter@hurleysoftware.com>
Date2015-08-06 13:30 +0200
SubjectRe: [PATCHv2 1/2] tty: serial: men_z135_uart.c: Fix race between IRQ and set_termios()
Message-ID<pUrx0-7uB-7@gated-at.bofh.it>
In reply to#1201506
On 08/06/2015 03:16 AM, Johannes Thumshirn wrote:
> Fix panic caused by a race between men_z135_intr() and men_z135_set_termios().
> 
> men_z135_intr() and men_z135_set_termios() both hold the struct uart_port::lock
> spinlock, but men_z135_intr() does a spin_lock_irqsave() and
> men_z135_set_termios() does a normal spin_lock(), which can lead to a deadlock
> when an interrupt is called while the lock is being helt by
> men_z135_set_termios().
> 
> This was discovered using a insmod, hardware looppback send/receive, rmmod
> stress test.

Reviewed-by: Peter Hurley <peter@hurleysoftware.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web