diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-02-09 03:01:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-02-09 03:01:17 -0800 |
| commit | f1a15652a2034b0b6da86209055c6828dd342716 (patch) | |
| tree | 7c17164a13154b98eeffa2d6f118ce6c9e3a75d6 /include/linux/loop.h | |
| parent | e88bb0c413ae98369ce7fc51963afb6e16cb5a3c (diff) | |
[PATCH] Write with buffer>2GB returns broken errno (2)
[ Acked by AKPM --RR ]
From: Kazuto MIYOSHI <miyoshi@hpc.bs1.fc.nec.co.jp>
On 64-bit platforms, issuing write(2) with buffer larger than
2GB will return -1 and broken errno (such as 2147483640)
Requested data itself is written correctly.
That is because generic_file_write() and other relating functions
store 'ssize_t written' into 'int err'. Written byte is trimmed to
int and then sign-extended to a negative ssize_t value, which
wrongly indicates an error.
(On 64bit platform, current glibc defines SSIZE_MAX as 'LONG_MAX')
Diffstat (limited to 'include/linux/loop.h')
0 files changed, 0 insertions, 0 deletions
