For clock_getres(clockid_t clock_id, struct timespec *res), the specification says "If res is NULL, the clock resolution is not returned." So this kind of call should succeed. The current implementation returns -EFAULT. The patch fixes the bug in compat_clock_getres(). Signed-off-by: Gordon Jin Signed-off-by: Arun Sharma --- linux-2.6.7/kernel/compat.c.orig 2004-07-25 09:02:01.000000000 -0700 +++ linux-2.6.7/kernel/compat.c 2004-07-25 09:04:51.000000000 -0700 @@ -531,7 +531,7 @@ err = sys_clock_getres(which_clock, (struct timespec __user *) &ts); set_fs(oldfs); - if (!err && put_compat_timespec(&ts, tp)) + if (!err && tp && put_compat_timespec(&ts, tp)) return -EFAULT; return err; }