mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tty: Fix tty_port kref screwup
@ 2008-10-21 12:47 Alan Cox
  0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2008-10-21 12:47 UTC (permalink / raw)
  To: torvalds, linux-kernel

From: Alan Cox <alan@redhat.com>

Pass the brown paper bags please. I changed the semantics of this so the
function was supposed to do the extra kref itself then forgot to do the
change.. duh....

Signed-off-by: Alan Cox <alan@redhat.com>
---

 drivers/char/tty_port.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index 553b0e9..c8f8024 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -90,7 +90,7 @@ void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
 	spin_lock_irqsave(&port->lock, flags);
 	if (port->tty)
 		tty_kref_put(port->tty);
-	port->tty = tty;
+	port->tty = tty_kref_get(tty);
 	spin_unlock_irqrestore(&port->lock, flags);
 }
 EXPORT_SYMBOL(tty_port_tty_set);


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

only message in thread, other threads:[~2008-10-21 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-21 12:47 [PATCH] tty: Fix tty_port kref screwup Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®