lkml.org 
[lkml]   [2006]   [Mar]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] alarm unsigned signed conversion fixup
Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Sat, 2006-03-18 at 12:12 -0800, Andrew Morton wrote:
> > Thomas Gleixner <tglx@linutronix.de> wrote:
> > >
> > > alarm() calls the kernel with an unsigend int timeout in seconds.
> > > The value is converted to a timeval which is used to setup the
> > > itimer. The tv_sec field of the timeval is a long, which causes
> > > the timeout to be negative on 32 bit machines if seconds > INT_MAX.
> > > Also this was silently caught before the hrtimer merge.
> > > To avoid fixups all over the place the duplicated sys_alarm code
> > > is moved to itimer.c.
> >
> > It's not clear what you mean by this. What does "silently caught" mean?
> >
> > I _think_ you mean "a negative tv_sec gets treated in a random fashion, but
> > with my preceding patch it will incorrectly get -EINVAL, so fix things to
> > accept this large tv_sec". Or something else.
> >
> > Please clarify.
> >
> > What happens if change sys_setitimer() to normalise the incoming timeval as
> > I suggested? I guess that doesn't affect this..
>
> No, because a negative value does not become positive by normalizing.
> Well except you build a normalizing function which converts negative
> values to INT_MAX.
>

I just don't know what this patch does, sorry.

I could go read it and work that out, but am lazy.

Can we start again?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-18 22:11    [from the cache]
©2003-2011 Jasper Spaans