stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "serial: mvebu-uart: free the IRQ in ->shutdown()" has been added to the 4.6-stable tree
@ 2016-08-14 18:37 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-08-14 18:37 UTC (permalink / raw)
  To: thomas.petazzoni, gregkh, oferh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    serial: mvebu-uart: free the IRQ in ->shutdown()

to the 4.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     serial-mvebu-uart-free-the-irq-in-shutdown.patch
and it can be found in the queue-4.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From c2c1659b4f8f9e19fe82a4fd06cca4b3d59090ce Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Thu, 16 Jun 2016 16:48:52 +0200
Subject: serial: mvebu-uart: free the IRQ in ->shutdown()

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

commit c2c1659b4f8f9e19fe82a4fd06cca4b3d59090ce upstream.

As suggested by the serial port infrastructure documentation, the IRQ is
requested in ->startup(). However, it is never freed in the ->shutdown()
hook.

With simple systems that open the serial port once for all and always
have at least one process that keep the serial port opened, there was no
problem. But with a more complicated system (*cough* systemd *cough*),
the serial port is opened/closed many times, which at some point no
processes having the serial port open at all. Due to this ->startup()
gets called again, tries to request_irq() again, which fails.

Fixes: 30530791a7a0 ("serial: mvebu-uart: initial support for Armada-3700 serial port")
Cc: Ofer Heifetz <oferh@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/mvebu-uart.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -299,6 +299,8 @@ static int mvebu_uart_startup(struct uar
 static void mvebu_uart_shutdown(struct uart_port *port)
 {
 	writel(0, port->membase + UART_CTRL);
+
+	free_irq(port->irq, port);
 }
 
 static void mvebu_uart_set_termios(struct uart_port *port,


Patches currently in stable-queue which might be from thomas.petazzoni@free-electrons.com are

queue-4.6/serial-mvebu-uart-free-the-irq-in-shutdown.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-14 18:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-14 18:37 Patch "serial: mvebu-uart: free the IRQ in ->shutdown()" has been added to the 4.6-stable tree gregkh

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).