Re: [GIT PULL] core kernel fixes

From: Linus Torvalds
Date: Fri Jul 10 2009 - 15:52:56 EST




On Fri, 10 Jul 2009, Ingo Molnar wrote:
> >
> > but I really migth have done soemthing wrong there. It's a simple
> > function, but somebody needs to double-check that I haven't made
> > it worse.
>
> Looks correct to me.

Note, I didn't look at how 'end' works, and it really does matter if 'end'
is an "inclusive" or "exclusive" end pointer address. So my replacement
overlap() function was written more as a conceptual patch - I did not
check the exact semantics of the arguments passed in.

If 'end' is exclusive, then 'b1' should be calculated as 'a1+size-1',
because the ranges must have the same rules. And then you should use the
'strict inequality' operators for testing the ranges.

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