On Thursday 13 March 2008, Christoph Lameter wrote: > On Wed, 12 Mar 2008, Jens Osterkamp wrote: > > > I added a printk in kmalloc and the size seems to be 0x4000. > > Hmmmm... So kmalloc_index returns 14. This should all be fine. > > However, with slub_debug the size of the 16k kmalloc object is > actually a bit larger than 0x4000. The caller must not expect the object > to be aligned to a 16kb boundary. Is that the case? Actually the caller expects exactly that. The kmalloc that I saw was coming from alloc_thread_info in dup_task_struct. For 4k pages this maps to __get_free_pages whereas for 64k pages it maps to kmalloc. The result of __get_free_pages seem to be aligned and kmalloc (with slub_debug) of course not. That explains the 4k/64k difference and the crash I am seeing... but I can't think of a reasonable fix right now as I don't understand the reason for the difference in the allocation code (yet). Gruß, Jens