[PATCH 2.4][SPARC64] fix sys32_utimes(somefile, NULL)

From: Jakub Bogusz
Date: Tue Jun 14 2005 - 14:17:24 EST


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@xxxxxxxxxxxxx>

--- linux-2.4.31/arch/sparc64/kernel/sys_sparc32.c.orig 2005-06-06 14:55:31.000000000 +0200
+++ linux-2.4.31/arch/sparc64/kernel/sys_sparc32.c 2005-06-14 12:00:15.000000000 +0200
@@ -4267,7 +4267,7 @@

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);


--
Jakub Bogusz http://qboosh.cs.net.pl/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/