Re: [BUG/PATCH] : bug in tty_default_put_char()

Russell King (rmk@arm.linux.org.uk)
Mon, 26 Aug 2002 21:17:21 +0100


On Mon, Aug 26, 2002 at 08:07:27PM +0100, Alan Cox wrote:
> On Mon, 2002-08-26 at 19:59, Jean Tourrilhes wrote:
> > Just check drivers/char/n_tty.c for every occurence of
> > put_char() and be scared. The problem is to find a practical solution.
> > For myself, I've added some clever workaround in IrCOMM to
> > accept data before full setup.
>
> Sure making it return the right errors doesnt fix anything, but it
> allows you to fix some of it bit by bit.

put_char() is not allowed to fail since the caller should have already
checked for buffer space via the write_room() method.

All places look adequately protected in n_tty.c, so I'm not currently
sure how Jean's users are seeing this condition; I'd need to have a
BUG() showing the call trace of such an event happening.

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

- 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/