lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 05/22] posix-timers:Convert to the 64bit methods for the timer_gettime syscall function
Date
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


\
 
 \ /
  Last update: 2015-05-12 09:41    [W:0.124 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site