[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1262828921-29517-4-git-send-email-a.beregalov@gmail.com>
Date: Thu, 7 Jan 2010 04:48:41 +0300
From: Alexander Beregalov <a.beregalov@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Alexander Beregalov <a.beregalov@...il.com>,
Jeff Dike <jdike@...toit.com>
Subject: [PATCH 4/4] uml: line.c: avoid NULL pointer dereference
Assign tty only if line is not NULL.
Cc: Jeff Dike <jdike@...toit.com>
Signed-off-by: Alexander Beregalov <a.beregalov@...il.com>
---
arch/um/drivers/line.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index cf8a97f..8ebdc8c 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -18,9 +18,10 @@ static irqreturn_t line_interrupt(int irq, void *data)
{
struct chan *chan = data;
struct line *line = chan->line;
- struct tty_struct *tty = line->tty;
+ struct tty_struct *tty;
if (line)
+ tty = line->tty;
chan_interrupt(&line->chan_list, &line->task, tty, irq);
return IRQ_HANDLED;
}
--
1.6.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists