[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTi=Fa38ufwR8PDc+HBHmLT53eWRA0ofrobm0n9-w@mail.gmail.com>
Date: Mon, 23 Aug 2010 10:25:35 +0200
From: Bert Wesarg <bert.wesarg@...glemail.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] posix clocks: introduce syscall for clock tuning.
On Mon, Aug 23, 2010 at 10:16, Richard Cochran <richardcochran@...il.com> wrote:
> diff --git a/kernel/compat.c b/kernel/compat.c
> index 5adab05..df1e469 100644
> --- a/kernel/compat.c
> +++ b/kernel/compat.c
> @@ -628,6 +628,26 @@ long compat_sys_clock_gettime(clockid_t which_clock,
> return err;
> }
>
> +long compat_sys_clock_adjtime(clockid_t which_clock, int ppb,
> + struct compat_timespec __user *tp)
> +{
> + long err;
> + mm_segment_t oldfs;
> + struct timespec ts, *ptr = NULL;
Shouldn't ptr be initialized with tp?
> +
> + if (tp) {
> + if (get_compat_timespec(&ts, tp))
> + return -EFAULT;
> + ptr = &ts;
> + }
> + oldfs = get_fs();
> + set_fs(KERNEL_DS);
> + err = sys_clock_adjtime(which_clock, ppb,
> + (struct timespec __user *) ptr);
> + set_fs(oldfs);
> + return err;
> +}
> +
> long compat_sys_clock_getres(clockid_t which_clock,
> struct compat_timespec __user *tp)
> {
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists