mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 02:02:28 +09:00
serial: tegra: fix tty-kref leak
commit cfd29aa0e8 upstream.
Fix potential tty-kref leak in stop_rx path.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fe0da74501
commit
64dc8de491
@@ -726,7 +726,7 @@ static irqreturn_t tegra_uart_isr(int irq, void *data)
|
||||
static void tegra_uart_stop_rx(struct uart_port *u)
|
||||
{
|
||||
struct tegra_uart_port *tup = to_tegra_uport(u);
|
||||
struct tty_struct *tty = tty_port_tty_get(&tup->uport.state->port);
|
||||
struct tty_struct *tty;
|
||||
struct tty_port *port = &u->state->port;
|
||||
struct dma_tx_state state;
|
||||
unsigned long ier;
|
||||
@@ -738,6 +738,8 @@ static void tegra_uart_stop_rx(struct uart_port *u)
|
||||
if (!tup->rx_in_progress)
|
||||
return;
|
||||
|
||||
tty = tty_port_tty_get(&tup->uport.state->port);
|
||||
|
||||
tegra_uart_wait_sym_time(tup, 1); /* wait a character interval */
|
||||
|
||||
ier = tup->ier_shadow;
|
||||
|
||||
Reference in New Issue
Block a user