From: Hollis Blanchard <hollisb@us.ibm.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [resend patch] HVSI hangup oops
Date: Wed, 27 Oct 2004 13:36:18 +0000 [thread overview]
Message-ID: <1098884177.3486.1.camel@localhost> (raw)
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 */
reply other threads:[~2004-10-27 19:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1098884177.3486.1.camel@localhost \
--to=hollisb@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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).