From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Harris, Jeff" <Jeff_Harris@kentrox.com>
Cc: <alan@linux.intel.com>, <vapier@gentoo.org>,
<adobriyan@gmail.com>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: Fix tcdrain hang due to tty chars_in_buffer errors
Date: Fri, 17 Jul 2009 18:18:52 +0100 [thread overview]
Message-ID: <20090717181852.54b1e41f@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <2E93DD7A4E576E48956F4A861E8B2CB801137D6D@dubexchange.corp.kentrox.com>
On Fri, 17 Jul 2009 12:36:22 -0400
"Harris, Jeff" <Jeff_Harris@kentrox.com> 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
though.
Alan
prev parent reply other threads:[~2009-07-17 17:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 15:07 Jeff Harris
2009-07-17 16:01 ` Alan Cox
2009-07-17 16:36 ` Harris, Jeff
2009-07-17 17:18 ` Alan Cox [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090717181852.54b1e41f@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=Jeff_Harris@kentrox.com \
--cc=adobriyan@gmail.com \
--cc=alan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®