From: Christoph Lameter <cl@linux-foundation.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: linux-kernel@vger.kernel.org, sfr@canb.auug.org.au
Subject: Re: [PATCH] SLAB: Fix slab_test.c CONFIG_CPUMASK_OFFSTACK build
Date: Mon, 7 Dec 2009 11:50:47 -0600 (CST) [thread overview]
Message-ID: <alpine.DEB.2.00.0912071150140.1208@router.home> (raw)
In-Reply-To: <1260205363-6015-1-git-send-email-penberg@cs.helsinki.fi>
On Mon, 7 Dec 2009, Pekka Enberg wrote:
> index e97afc4..0d23dc1 100644
> --- a/tests/slab_test.c
> +++ b/tests/slab_test.c
> @@ -170,10 +170,13 @@ static int started;
> static int test_func(void *private)
> {
> struct test_struct *t = private;
> - cpumask_t newmask = CPU_MASK_NONE;
> + cpumask_var_t newmask;
>
> - cpu_set(t->cpu, newmask);
> - set_cpus_allowed(current, newmask);
Whitespace damage?
> + if (!alloc_cpumask_var(&newmask, GFP_KERNEL))
> + return -ENOMEM;
> +
> + cpumask_set_cpu(t->cpu, newmask);
> + set_cpus_allowed_ptr(current, newmask);
> t->v = kzalloc(t->count * sizeof(void *), GFP_KERNEL);
>
> atomic_inc(&tests_running);
> @@ -188,6 +191,7 @@ static int test_func(void *private)
> t->test_p2(t);
> t->stop2 = get_cycles();
> kfree(t->v);
> + free_cpumask_var(newmask);
> atomic_dec(&tests_running);
> set_current_state(TASK_UNINTERRUPTIBLE);
> schedule();
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
prev parent reply other threads:[~2009-12-07 17:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-07 17:02 Pekka Enberg
2009-12-07 17:50 ` Christoph Lameter [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=alpine.DEB.2.00.0912071150140.1208@router.home \
--to=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=sfr@canb.auug.org.au \
/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®