From: Johan Hovold <jhovold@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
Stephen Warren <swarren@wwwdotorg.org>,
linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
Johan Hovold <jhovold@gmail.com>,
stable@vger.kernel.org
Subject: [PATCH 2/4] serial: pch_uart: fix tty-kref leak in rx-error path
Date: Tue, 10 Sep 2013 12:50:49 +0200 [thread overview]
Message-ID: <1378810251-28499-3-git-send-email-jhovold@gmail.com> (raw)
In-Reply-To: <1378810251-28499-1-git-send-email-jhovold@gmail.com>
Fix tty-kref leak introduced by commit 384e301e ("pch_uart: fix a
deadlock when pch_uart as console") which never put its tty reference.
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
drivers/tty/serial/pch_uart.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 52379e5..f0161d6 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -1098,6 +1098,8 @@ static void pch_uart_err_ir(struct eg20t_port *priv, unsigned int lsr)
if (tty == NULL) {
for (i = 0; error_msg[i] != NULL; i++)
dev_err(&priv->pdev->dev, error_msg[i]);
+ } else {
+ tty_kref_put(tty);
}
}
--
1.8.3.2
next prev parent reply other threads:[~2013-09-10 10:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 10:50 [PATCH 0/4] serial: fix tty-kref leaks Johan Hovold
2013-09-10 10:50 ` Johan Hovold [this message]
2013-09-10 10:50 ` [PATCH 3/4] serial: pch_uart: fix tty-kref leak in dma-rx path Johan Hovold
[not found] ` <1378810251-28499-1-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-10 10:50 ` [PATCH 1/4] serial: tegra: fix tty-kref leak Johan Hovold
[not found] ` <1378810251-28499-2-git-send-email-jhovold-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-10 16:42 ` Stephen Warren
2013-09-10 10:50 ` [PATCH 4/4] serial: pch_uart: remove unnecessary tty_port_tty_get Johan Hovold
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=1378810251-28499-3-git-send-email-jhovold@gmail.com \
--to=jhovold@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=swarren@wwwdotorg.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;
as well as URLs for NNTP newsgroup(s).