public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Pritchard <steve@silug.org>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Specialix RIO Oops fix
Date: Mon, 4 Feb 2002 09:02:00 -0600	[thread overview]
Message-ID: <20020204090200.A30872@osiris.silug.org> (raw)

The patch below fixes an Oops in the Specialix RIO driver.  I sent
this to the maintainer a couple of months ago and never got a
response.

Note that this patch doesn't actually make the driver *work* for my
client...  It still causes a hard lockup that I was unable to debug in
the short time I had to work on it.  Specialix apparently told my
client that they would have to switch to the original Red Hat 7.1
kernel (2.4.2-something) if they wanted it to actually work.

In any case, this patch seems to be a no-brainer.  It merely adds a
check that I see in every other serial driver's set_real_termios()
function.

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(618)398-7360             | See web site for meeting details.
Steven Pritchard          | http://www.silug.org/

--- linux-2.4.17.orig/drivers/char/rio/rio_linux.c	Thu Oct 25 15:53:47 2001
+++ linux-2.4.17/drivers/char/rio/rio_linux.c	Mon Feb  4 08:53:34 2002
@@ -422,6 +422,11 @@
   struct tty_struct *tty;
   func_enter();
 
+  if (!((struct Port *)ptr)->gs.tty || !((struct Port *)ptr)->gs.tty->termios) {
+    func_exit();
+    return 0;
+  }
+
   tty = ((struct Port *)ptr)->gs.tty;
 
   modem = (MAJOR(tty->device) == RIO_NORMAL_MAJOR0) || (MAJOR(tty->device) == RIO_NORMAL_MAJOR1);

             reply	other threads:[~2002-02-04 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-04 15:02 Steven Pritchard [this message]
2002-02-04 15:43 ` [PATCH] Specialix RIO Oops fix Alan Cox
2002-02-08 21:14 ` Rogier Wolff

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=20020204090200.A30872@osiris.silug.org \
    --to=steve@silug.org \
    --cc=linux-kernel@vger.kernel.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