lkml.org 
[lkml]   [2004]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch] HVSI hangup oops
From
Date
Hi Linus, 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 */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.749 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site