[powerpc] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()
Segher Boessenkool
segher at kernel.crashing.org
Fri Dec 22 11:31:26 EST 2006
> + if (len > TASK_SIZE)
> + return -ENOMEM;
Shouldn't that be addr+len instead? The check looks incomplete
otherwise. And you meant ">=" I guess?
> - /* Paranoia, caller should have dealt with this */
> - BUG_ON((addr + len) > 0x100000000UL);
> -
Any real reason to remove the paranoia check? If it's trivially
always satisfied, the compiler will get rid of it for you :-)
Cheers,
Segher
More information about the Linuxppc-dev
mailing list