All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: jt@hpl.hp.com
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	tytso@mit.edu, Andrew Morton <andrewm@uow.edu.eu>,
	irda-users@lists.sourceforge.net
Subject: Re: [BUG/PATCH] : bug in tty_default_put_char()
Date: Mon, 26 Aug 2002 20:31:26 +0100	[thread overview]
Message-ID: <20020826203126.C4763@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20020826180749.GA8630@bougret.hpl.hp.com>; from jt@bougret.hpl.hp.com on Mon, Aug 26, 2002 at 11:07:49AM -0700

On Mon, Aug 26, 2002 at 11:07:49AM -0700, Jean Tourrilhes wrote:
> 	Bug : tty_default_put_char() doesn't check the return value of
> tty->driver.write(). However, the later may fail if buffers are full.

Hmm.

> 	Solution : It's not obvious what should be done. The attached
> patch is certainly wrong, but gives you an idea of what the problem
> is.

Every invocation of the put_char() method should be preceded by a check
to ensure that there is sufficient space in the drivers buffer (via the
drivers write_room() call.)  Could you add a BUG() on this condition
and get some call traces please?

> 	I'll try to workaround that in IrCOMM.

I don't think that should be necessary.  The tty layer is obviously
doing something it shouldn't (trying to stuff characters into a buffer
of zero size) so it should get fixed.

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  parent reply	other threads:[~2002-08-26 19:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 18:07 [BUG/PATCH] : bug in tty_default_put_char() Jean Tourrilhes
     [not found] ` <1030388224.2797.2.camel@irongate.swansea.linux.org.uk>
2002-08-26 18:59   ` Jean Tourrilhes
2002-08-26 19:07     ` Alan Cox
2002-08-26 20:17       ` Russell King
2002-08-26 19:31 ` Russell King [this message]
     [not found]   ` <20020826195346.GC8749@bougret.hpl.hp.com>
     [not found]     ` <20020826210159.E4763@flint.arm.linux.org.uk>
     [not found]       ` <20020826201732.GE8749@bougret.hpl.hp.com>
     [not found]         ` <20020826212223.H4763@flint.arm.linux.org.uk>
2002-08-28 22:41           ` Jean Tourrilhes
2002-08-28 23:16             ` Russell King

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=20020826203126.C4763@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andrewm@uow.edu.eu \
    --cc=irda-users@lists.sourceforge.net \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.