* [PATCH] uml: line.c: avoid NULL pointer dereference
@ 2010-01-07 15:57 Alexander Beregalov
0 siblings, 0 replies; only message in thread
From: Alexander Beregalov @ 2010-01-07 15:57 UTC (permalink / raw)
To: linux-kernel; +Cc: Alexander Beregalov, Jeff Dike
Assign tty only if line is not NULL.
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
---
arch/um/drivers/line.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index cf8a97f..4a46253 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -18,10 +18,12 @@ 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)
+ if (line) {
+ tty = line->tty;
chan_interrupt(&line->chan_list, &line->task, tty, irq);
+ }
return IRQ_HANDLED;
}
--
1.6.6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-07 15:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-07 15:57 [PATCH] uml: line.c: avoid NULL pointer dereference Alexander Beregalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®