Re: TTY loosing data with u_serial gadget
From: Alan Cox
Date: Fri Mar 18 2011 - 14:07:10 EST
> I had also a look at the relevant fixes, a lot is done but I could not find
> the required protection of the attribute receive_room.
receive_room isn't protected because it may only be shrunk by the amount
of data sent to the ldisc or less. The ldisc is at liberty to grow the
value as it sees fit.
In essence if you get a value from receive_room it's a guarantee you may
send that many bytes, it is not a precise instantaneous perfect answer to
the question "exactly what number of bytes could fit at this precise
Which does of course mean you should never see the case where
receive_room is bigger than the actual space available in tty raw mode.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/