All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] posix clocks: introduce syscall for clock tuning.
Date: Mon, 23 Aug 2010 10:25:35 +0200	[thread overview]
Message-ID: <AANLkTi=Fa38ufwR8PDc+HBHmLT53eWRA0ofrobm0n9-w@mail.gmail.com> (raw)
In-Reply-To: <e253843e07ce5d15c2c8d11ce786bf979ed85ca5.1282550649.git.richard.cochran@omicron.at>

On Mon, Aug 23, 2010 at 10:16, Richard Cochran <richardcochran@gmail.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)
>  {

  parent reply	other threads:[~2010-08-23  8:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23  8:15 [PATCH RFC 0/1] introduce a syscall for posix clock tuning Richard Cochran
2010-08-23  8:16 ` [PATCH 1/1] posix clocks: introduce syscall for " Richard Cochran
2010-08-23  8:22   ` Mike Frysinger
2010-08-23  8:52     ` Richard Cochran
2010-08-23  8:25   ` Bert Wesarg [this message]
2010-08-23  8:55     ` Richard Cochran
2010-08-23 12:57   ` Arnd Bergmann
2010-08-23 12:57     ` Arnd Bergmann
2010-08-23 13:43     ` Matthew Wilcox
2010-08-23 13:43       ` Matthew Wilcox
2010-08-23 14:46       ` Arnd Bergmann
2010-08-23 14:46         ` Arnd Bergmann
2010-08-23 16:57         ` Roland McGrath
2010-08-23 20:41     ` john stultz
2010-08-27 11:24       ` Richard Cochran
2010-08-27 11:24         ` Richard Cochran
2010-08-27 20:48         ` John Stultz
2010-08-27 20:48           ` John Stultz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=Fa38ufwR8PDc+HBHmLT53eWRA0ofrobm0n9-w@mail.gmail.com' \
    --to=bert.wesarg@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.