]> git.proxmox.com Git - mirror_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)
committerLaurent Vivier <laurent@vivier.eu>
Thu, 10 Jan 2019 08:36:41 +0000 (09:36 +0100)
commit2bd3f8998e1e7dcd9afc29fab252fb9936f9e956
tree0f16aecf8aa56c0a3824354a81ae62e427c7c5d4
parentbd8ed485490e1b0ecac5b39fe654bb83b6b39db6
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>
linux-user/syscall.c