[PATCH] powerpc: change rheap functions to use long integers instead of pointers
Scott Wood
scottwood at freescale.com
Thu Apr 5 04:24:15 EST 2007
Timur Tabi wrote:
> Scott's right. rh_attach_region() never supported anything above
> "(unsigned long) -MAXERR". Perhaps I should add a check for that?
>
> /* Round start up */
> s = (s + m) & ~m;
>
> + if (IS_ERR_VALUE(s))
> + return -EINVAL;
>
> /* Round end down */
> e = e & ~m;
>
> The same patch should be applied to rh_detach_region() and
> rh_alloc_fixed().
You should check "e" instead, and make sure that s < e.
-Scott
More information about the Linuxppc-dev
mailing list