OSDN Git Service

[SPARC64]: fix sys32_utimes(somefile, NULL)
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 26 Jul 2005 20:45:51 +0000 (13:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Jul 2005 20:45:51 +0000 (13:45 -0700)
This patch fixes utimes(somefile, NULL) syscalls on sparc64 kernel with
32-bit userland - use of uninitialized value resulted in making random
timestamps, which confused e.g. sudo.
It has been already fixed (by davem) in linux-2.6 tree 30 months ago.

Signed-off-by: Jakub Bogusz <qboosh@pld-linux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/sys_sparc32.c

index dc519ab..bf0cd15 100644 (file)
@@ -4205,7 +4205,7 @@ asmlinkage int sys32_utimes(char *filename, struct timeval32 *tvs)
 
                old_fs = get_fs();
                set_fs(KERNEL_DS);
-               ret = sys_utimes(kfilename, &ktvs[0]);
+               ret = sys_utimes(kfilename, (tvs ? &ktvs[0] : NULL));
                set_fs(old_fs);
 
                putname(kfilename);