On Thu, 3 Jan 2019 at 18:31, Peter Maydell <peter.mayd...@linaro.org> wrote: > Hi; following up on this, we've just had > https://bugs.launchpad.net/qemu/+bug/1810433 which is > a report of the same NULL/0 bug for pwrite64. Looking at the > kernel code I see that both the write and pwrite64 syscalls > go through the same vfs_write() common function, so their > behaviour for NULL/0 should be identical. Experimentally, > stracing the 1810433 test program gives > pwrite64(3, NULL, 0, 0) = 0 > so we do indeed need to special case NULL/0 there as well > as in write(). > > The extra fix should be straightforward -- does anybody > feel like writing up a patch for it?
I've just sent a patch: https://patchwork.ozlabs.org/patch/1022092/ thanks -- PMM