> A strange thing is that __mm_populate() is only called by do_mlock() from mm/mlock.c, > which makes len PAGE_ALIGN already. That VM_BUG_ON should not be triggered. Unless I overlooked something, __mm_populate() gets called from: load_elf_library() -> vm_brk() -> vm_brk_flags(): vm_brk_flags() { ... populate = ((mm->def_flags & VM_LOCKED) != 0); ... if (populate && !ret) mm_populate(addr, len); } mm_populate() -> __mm_populate(): __mm_populate() { ... VM_BUG_ON(len != PAGE_ALIGN(len)); ... } In load_elf_library(), we have: len = ELF_PAGESTART(eppnt->p_filesz + eppnt->p_vaddr + ELF_MIN_ALIGN - 1); bss = eppnt->p_memsz + eppnt->p_vaddr; if (bss > len) { error = vm_brk(len, bss - len); if (error) goto out_free_ph; } So len gets page aligned, but not bss (eppnt->p_memsz + eppnt->p_vaddr), maybe that's the problem? -- Oscar Salvador SUSE L3