tcp: Fix >4GB writes on 64-bit.
Fixes kernel bugzilla #16603 tcp_sendmsg() truncates iov_len to an 'int' which a 4GB write to write zero bytes, for example. There is also the problem higher up of how verify_iovec() works. It wants to prevent the total length from looking like an error return value. However it does this using 'int', but syscalls return 'long' (and thus signed 64-bit on 64-bit machines). So it could trigger false-positives on 64-bit as written. So fix it to use 'long'. Reported-by: Olaf Bonorden <email@example.com> Reported-by: Daniel Büse <firstname.lastname@example.org> Reported-by: Andrew Morton <email@example.com> Signed-off-by: David S. Miller <firstname.lastname@example.org>
Showing with 5 additions and 4 deletions