mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* errorpath in expand_stack() [2.6.7-rc1]
@ 2004-05-24 20:28 Herbert Poetzl
  2004-05-24 20:42 ` Chris Wright
  0 siblings, 1 reply; 2+ messages in thread
From: Herbert Poetzl @ 2004-05-24 20:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-05-24 20:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-24 20:28 errorpath in expand_stack() [2.6.7-rc1] Herbert Poetzl
2004-05-24 20:42 ` Chris Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®