[lkml]   [2011]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: TTY loosing data with u_serial gadget
> 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.

 \ /
  Last update: 2011-03-18 19:09    [W:0.049 / U:4.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site