From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: Kirill Korotaev <dev@sw.ru>,
torvalds@osdl.org, linux-kernel@vger.kernel.org, xemul@sw.ru,
hugh@veritas.com
Subject: Re: [PATCH] error path in setup_arg_pages() misses vm_unacct_memory()
Date: Tue, 13 Sep 2005 12:58:15 +0100 [thread overview]
Message-ID: <1126612695.31228.24.camel@localhost.localdomain> (raw)
In-Reply-To: <20050913014008.0ee54c62.akpm@osdl.org>
On Maw, 2005-09-13 at 01:40 -0700, Andrew Morton wrote:
> Kirill Korotaev <dev@sw.ru> wrote:
> >
> > maybe it is worth moving vm_acct_memory() out of
> > security_vm_enough_memory()?
>
> I think that would be saner, yes. That means that the callers would call
> vm_acct_memory() after security_enough_memory(), if that succeeded.
It would make much more sense to simply sed security_vm_enough_memory()
into security_vm_claim_memory() or a better name. You need to perform
the process as one thing otherwise two people checking for enough memory
may both succeed and then both reserve memory causing overcommits that
should not be permitted.
If you jut fix the name you get the right semantics still but without
the confusion.
Alan
next prev parent reply other threads:[~2005-09-13 11:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-12 16:49 [PATCH] error path in setup_arg_pages() misses vm_unacct_memory() Kirill Korotaev
2005-09-12 20:23 ` Andrew Morton
2005-09-13 8:21 ` Kirill Korotaev
2005-09-13 8:40 ` Andrew Morton
2005-09-13 11:30 ` Hugh Dickins
2005-09-13 18:37 ` Andrew Morton
2005-09-13 19:10 ` Hugh Dickins
2005-09-13 11:58 ` Alan Cox [this message]
2005-09-13 11:20 ` Hugh Dickins
2005-09-13 12:13 ` Kirill Korotaev
2005-09-14 5:13 ` Hugh Dickins
2005-09-14 8:41 ` Kirill Korotaev
2005-09-14 9:14 ` Hugh Dickins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1126612695.31228.24.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=dev@sw.ru \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=xemul@sw.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox