Re: [PATCH] missing NULL check in drivers/char/n_tty.c

From: Paul Fulghum
Date: Mon Jun 21 2004 - 14:53:39 EST


Andrew Morton wrote:

Paul Fulghum <paulkf@xxxxxxxxxxxxx> wrote:
Which would be better?
1. Ignore this
2. Fix conditional debug output to check
for ldisc.chars_in_buffer==NULL
3. Remove conditional debug output

Option 1 is quite valid. There are no bugs here, yes?

If the debug output is enabled and
a line discipline other than N_TTY is used,
then you get an oops when the NULL method
is called.

Since the debug output is not enabled by
default, and is probably never really used,
it is not a significant bug.

I thought it might be worth eliminating or
correcting the debug outputs since they seem
to get cloned into new serial drivers.
It is certainly not a big problem.

If someone for some reason wants to clean all this up, the best way would
be to require that ->chars_in_buffer always be valid, hence remove all
those checks.

OK

--
Paul Fulghum
paulkf@xxxxxxxxxxxxx
-
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/