compat_clock_getres shouldn't return -EFAULT if res == NULL
Description within the patch.
-Arun
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 <[email protected]>
Signed-off-by Arun Sharma <[email protected]>
kernel/compat.c renamed from kernel/compat.c.orig +1 -1
@@ -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; }
Quoted 1 line · On Mon, 26 Jul 2004 12:51:29 -0700 Arun Sharma <[email protected]> wrote:
Description within the patch.
Looks good.
Quoted 7 lines · David S. Miller
Quoted 1 line · On Mon, 26 Jul 2004 12:51:29 -0700 Arun Sharma <[email protected]> wrote:
Description within the patch.
Looks good.
I'll queue it up. I seem to have ~200 patches to deal with, mostly non-trivial :(