On Fri, Jul 9, 2010 at 8:01 PM, Mulyadi Santosa
<[email protected]> wrote:
> On Sat, Jul 10, 2010 at 06:53, GoatZilla <[email protected]> wrote:
>> When it hits slab_order:
>>
>> http://lxr.linux.no/linux+v2.6.34.1/mm/slub.c#L1958
>>
>> It finds that the minimum page order can hold more than
>> MAX_OBJS_PER_PAGE, so it then requests the order of the page that
>> holds the max objects.
>>
>> In our case, it turns out to be 0 still, so it subtracts 1 from that,
>> returns a -1, and the allocation fails and the kernel panics.
>
> Assuming get_order is expanded like in
> http://lxr.linux.no/#linux+v2.6.34.1/include/asm-generic/getorder.h#L9,
> briefly I don't see how it can get to -1.... CMIIW

get_order returns 0 for a 8 * MAX_OBJS_PER_PAGE with a page size of 1MB.

Then slab_order does this with it:

return get_order(size * MAX_OBJS_PER_PAGE) - 1;

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to