[patch 1/8] uml: avoid NULL dereference in line.c

From: blaisorblade_spam
Date: Thu Jan 13 2005 - 11:06:16 EST



From: Frank Sorenson <frank@xxxxxxxxxxxx>

This patch reorders two lines to check a variable for NULL before using
the variable.

Signed-off-by: Frank Sorenson <frank@xxxxxxxxxxxx>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@xxxxxxxx>
---

linux-2.6.11-paolo/arch/um/drivers/line.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN arch/um/drivers/line.c~uml-reorder_null_check arch/um/drivers/line.c
--- linux-2.6.11/arch/um/drivers/line.c~uml-reorder_null_check 2005-01-13 01:54:17.163057872 +0100
+++ linux-2.6.11-paolo/arch/um/drivers/line.c 2005-01-13 01:54:17.166057416 +0100
@@ -593,8 +593,8 @@ irqreturn_t winch_interrupt(int irq, voi
}
}
tty = winch->tty;
- line = tty->driver_data;
if (tty != NULL) {
+ line = tty->driver_data;
chan_window_size(&line->chan_list,
&tty->winsize.ws_row,
&tty->winsize.ws_col);
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/