Commit e6d7bb28 authored by Linus Torvalds's avatar Linus Torvalds

Fix bogus opost buffer size check

Noted while going through the n_tty code: that buffer check
used to check against the size of the temporary kernel buffer,
but since the tty layer was changed to use kernel buffers
though-out, the kernel buffer array became just a pointer, and
the check was limiting the opost blocksize to the size of a
pointer, which makes no sense.

Just remove it, since now the whole buffer is always in kernel
space.
parent 15fb56f4
......@@ -317,8 +317,6 @@ static ssize_t opost_block(struct tty_struct * tty,
return 0;
if (nr > space)
nr = space;
if (nr > sizeof(buf))
nr = sizeof(buf);
for (i = 0, cp = buf; i < nr; i++, cp++) {
switch (*cp) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment