[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tty: Fix tcdrain hang due to tty chars_in_buffer errors
On Fri, 17 Jul 2009 12:36:22 -0400
"Harris, Jeff" <> wrote:

> That was my other thought, but there are other kernel drivers which do
> report errors from chars_in_buffer. A grep of the code shows
> ipw_chars_in_buffer in drivers/char/pcmcia/ipwireless/tty.c,
> hvc_chars_in_buffer in hvc_console.c, ntty_chars_in_buffer in nozomi.c,
> if_chars_in_buffer in isdn/gigaset/interface.c, etc. Do they all need
> to be updated?

Yes I've squashed a pile and there may be more left.

> Should the return type be unsigned int to make the behavior more
> explicit? The signed type may be interpreted along the lines of a read
> or write call which returns a count or a negative value to indicate a
> failure.

That would simply have people returning very large numbers. I don't think
the compiler can cure that. Putting a WARN_ON(x < 0); might liven it up


 \ /
  Last update: 2009-07-17 19:23    [W:0.028 / U:8.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site