lkml.org 
[lkml]   [2004]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 21 Jun 2004 00:39:44 -0700
FromAndrew Morton <>
SubjectRe: [PATCH] missing NULL check in drivers/char/n_tty.c
Dan Aloni <da-x@gmx.net> wrote:
>
> On Sun, Jun 20, 2004 at 11:58:24PM -0700, Andrew Morton wrote:
> > Dan Aloni <da-x@gmx.net> wrote:
> > >
> > > The rest of the kernel treats tty->driver->chars_in_buffer as a possible
> > >  NULL. This patch changes normal_poll() to be consistent with the rest of
> > >  the code.
> > 
> > It would be better to change the rest of the kernel - remove the tests.
> > 
> > If any driver fails to implement ->chars_in_buffer() then we get a nice
> > oops which tells us that driver needs a stub handler.
> 
> Are you sure that it won't affect the logic in tty_wait_until_sent() 
> drastically? It acts quite differently when ->chars_in_buffer == NULL.

I did a quick grep and it appears that all drivers have set ->chars_in_buffer().

I suspect there are no drivers which fail to set chars_in_buffer. 
Otherwise normal_poll() would have been oopsing in 2.4, 2.5 and 2.6?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [from the cache]
©2003-2008