mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	y2038 Mailman List <y2038@lists.linaro.org>
Subject: Re: [PATCH v3 05/22] posix-timers:Convert to the 64bit methods for the timer_gettime syscall function
Date: Tue, 12 May 2015 09:33:18 +0200	[thread overview]
Message-ID: <49986285.ET1L7YzbRx@wuerfel> (raw)
In-Reply-To: <CAMz4kuKbOGJ+_x5K3Eg_-84YaYEHFPNsxUnL5U+bgxp5iR_C6w@mail.gmail.com>

On Tuesday 12 May 2015 10:05:45 Baolin Wang wrote:
> On 12 May 2015 at 00:30, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > On Monday 11 May 2015 19:15:14 Baolin Wang wrote:
> > > +static int default_timer_get64(struct k_itimer *timr,
> > > +                              struct itimerspec64 *cur_setting64)
> > > +{
> > > +       struct itimerspec cur_setting;
> > > +       struct k_clock *kc = clockid_to_kclock(timr->it_clock);
> > > +
> > > +       kc->timer_get(timr, &cur_setting);
> > > +       return 0;
> > > +}
> >
> > This function is unfortunately incorrect, because you never copy
> > the cur_setting value into cur_setting64.
> >
> 
> Thanks for your comments. But i think this is just  a temporary default
> function,
> and will be removed after all the drivers' conversion, so just ensure it
> won't
> cause the kernel crash.
> 

No, that function has to do the right thing. The purpose of the function
is to keep the kernel working when only half the series is applied, this
is a fundamental part of how we do kernel development: Each patch in
you series needs to bring the kernel closer to what we want to have in
the end but not introduce bugs. Your current function stops the
timer_gettime() system call from working and makes it return uninitialized
kernel data.

	Arnd

  parent reply	other threads:[~2015-05-12  7:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 11:15 Baolin Wang
2015-05-11 16:30 ` Arnd Bergmann
     [not found]   ` <CAMz4kuKbOGJ+_x5K3Eg_-84YaYEHFPNsxUnL5U+bgxp5iR_C6w@mail.gmail.com>
2015-05-12  7:33     ` Arnd Bergmann [this message]
2015-05-12 14:39     ` Thomas Gleixner

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=49986285.ET1L7YzbRx@wuerfel \
    --to=arnd@arndb.de \
    --cc=baolin.wang@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=y2038@lists.linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®