[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/11] linux-user: zero fstat buffer to initialize n
From: |
riku . voipio |
Subject: |
[Qemu-devel] [PATCH 10/11] linux-user: zero fstat buffer to initialize nsec fields |
Date: |
Thu, 13 Aug 2009 23:06:23 +0300 |
From: Ulrich Hecht <address@hidden>
The fstat implementation does not initialize the nanosecond fields in the
stat buffer; this caused funny values to turn up there, preventing, for
instance, cp -p from preserving timestamps because utimensat rejected
the out-of-bounds nanosecond values. Resetting the entire structure
to zero fixes that.
Signed-off-by: Ulrich Hecht <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
linux-user/syscall.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f90be71..66a25a0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5526,6 +5526,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
if (!lock_user_struct(VERIFY_WRITE, target_st, arg2, 0))
goto efault;
+ memset(target_st, 0, sizeof(*target_st));
__put_user(st.st_dev, &target_st->st_dev);
__put_user(st.st_ino, &target_st->st_ino);
__put_user(st.st_mode, &target_st->st_mode);
--
1.6.2.1
- [Qemu-devel] [PATCH 00/11] linux-user patches for HEAD, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 02/11] m68k,linux-user: add setup_frame, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 01/11] linux-user: add eventfd support, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 04/11] m68k, linux-user: enable sigaltstack(), riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 03/11] m68k, linux-user: add setup_rt_frame, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 05/11] linux-user: fix mq_* compilation problems, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 11/11] linux-user: Rewrite mmap_find_vma() to work fine on 64-bit hosts with 32-bit targets, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 06/11] linux-user: fcntl fixes for LTP, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 10/11] linux-user: zero fstat buffer to initialize nsec fields,
riku . voipio <=
- [Qemu-devel] [PATCH 07/11] linux-user: enable getdents for > 32-bit systems, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 09/11] linux-user: fadvise64 implementation, riku . voipio, 2009/08/13
- [Qemu-devel] [PATCH 08/11] linux-user: define a couple of syscalls for non-uid16 targets, riku . voipio, 2009/08/13