From: Nick Piggin <npiggin@suse.de>
To: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>, linux-kernel@vger.kernel.org
Subject: Re: [patch] slqb: enforce MAX_ORDER
Date: Tue, 28 Apr 2009 06:41:02 +0200 [thread overview]
Message-ID: <20090428044102.GC6304@wotan.suse.de> (raw)
In-Reply-To: <alpine.DEB.2.00.0904261255520.18988@chino.kir.corp.google.com>
On Sun, Apr 26, 2009 at 12:56:31PM -0700, David Rientjes wrote:
> Slabs may not be allocated at MAX_ORDER or higher.
>
> Cc: Nick Piggin <npiggin@suse.de>
> Signed-off-by: David Rientjes <rientjes@google.com>
Thanks
> ---
> mm/slqb.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/mm/slqb.c b/mm/slqb.c
> --- a/mm/slqb.c
> +++ b/mm/slqb.c
> @@ -872,6 +872,7 @@ __setup("slqb_debug", setup_slqb_debug);
> static int __init setup_slqb_min_order(char *str)
> {
> get_option(&str, &slqb_min_order);
> + slqb_min_order = min(slqb_min_order, MAX_ORDER - 1);
>
> return 1;
> }
> @@ -1840,8 +1841,8 @@ static int calculate_order(int size)
> * This size cannot fit in order-1. Allow bigger orders, but
> * forget about trying to save space.
> */
> - order = slab_order(size, MAX_ORDER, 0);
> - if (order <= MAX_ORDER)
> + order = slab_order(size, MAX_ORDER - 1, 0);
> + if (order < MAX_ORDER)
> return order;
>
> return -ENOSYS;
prev parent reply other threads:[~2009-04-28 4:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 19:56 David Rientjes
2009-04-27 7:22 ` Pekka Enberg
2009-04-28 4:41 ` Nick Piggin [this message]
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=20090428044102.GC6304@wotan.suse.de \
--to=npiggin@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rientjes@google.com \
/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
all inboxes | Powered by JetHome®