lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] SLAB: Fix slab_test.c CONFIG_CPUMASK_OFFSTACK build
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>



\
 
 \ /
  Last update: 2009-12-07 18:53    [W:0.037 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site