linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [resend patch] HVSI hangup oops
@ 2004-10-27 13:36 Hollis Blanchard
  0 siblings, 0 replies; only message in thread
From: Hollis Blanchard @ 2004-10-27 13:36 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi Linus, I've tested this with the current BK tree as you requested.

Testing revealed that the HVSI driver could oops if carrier
detect dropped mid-data transfer. Please apply this fix.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>

-- 
Hollis Blanchard
IBM Linux Technology Center

--- drivers/char/hvsi.c.orig	2004-10-11 11:36:36.000000000 -0500
+++ drivers/char/hvsi.c	2004-10-11 13:24:13.000000000 -0500
@@ -927,11 +927,17 @@ static void hvsi_close(struct tty_struct
 static void hvsi_hangup(struct tty_struct *tty)
 {
 	struct hvsi_struct *hp = tty->driver_data;
+	unsigned long flags;
 
 	pr_debug("%s\n", __FUNCTION__);
 
+	spin_lock_irqsave(&hp->lock, flags);
+
 	hp->count = 0;
+	hp->n_outbuf = 0;
 	hp->tty = NULL;
+
+	spin_unlock_irqrestore(&hp->lock, flags);
 }
 
 /* called with hp->lock held */



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

only message in thread, other threads:[~2004-10-27 19:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-27 13:36 [resend patch] HVSI hangup oops Hollis Blanchard

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