]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 8 Jan 2019 18:49:00 +0000 (18:49 +0000)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 2 Apr 2019 01:36:21 +0000 (20:36 -0500)
commit422bf25df10c55db2cd4fcee045d64a8b1d3c220
tree7f0cd56a18c57749f701461b821ee8ea7fb5b8df
parent89d22376836556fe81664f1b4be2fc2aaa9cd950
linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0

Linux returns success if pwrite64() or pread64() are called with a
zero length NULL buffer, but QEMU was returning -TARGET_EFAULT.

This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9
for the write syscall, and long before that in 38d840e6790c29f59
for the read syscall.

Fixes: https://bugs.launchpad.net/qemu/+bug/1810433
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190108184900.9654-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
(cherry picked from commit 2bd3f8998e1e7dcd9afc29fab252fb9936f9e956)
*drop functional dep. on 2852aafd9d
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
linux-user/syscall.c