errorpath in expand_stack() [2.6.7-rc1]

From: Herbert Poetzl
Date: Mon May 24 2004 - 15:32:18 EST



another question:

I'm not sure the vm_unacct_memory(grow) is
correct here, but if, shouldn't there be the
same in the security_vm_enough_memory(grow)
path?

mm/mmap.c ~1260 expand_stack()

/* Overcommit.. */
if (security_vm_enough_memory(grow)) {
anon_vma_unlock(vma);
return -ENOMEM;
}

if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) >
current->rlim[RLIMIT_AS].rlim_cur) {
anon_vma_unlock(vma);
vm_unacct_memory(grow);
return -ENOMEM;
}


TIA,
Herbert

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/