Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935584AbZLGRuz (ORCPT ); Mon, 7 Dec 2009 12:50:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S935574AbZLGRuw (ORCPT ); Mon, 7 Dec 2009 12:50:52 -0500 Received: from nlpi129.sbcis.sbc.com ([207.115.36.143]:44656 "EHLO nlpi129.prodigy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935518AbZLGRut (ORCPT ); Mon, 7 Dec 2009 12:50:49 -0500 Date: Mon, 7 Dec 2009 11:50:47 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@router.home To: Pekka Enberg cc: linux-kernel@vger.kernel.org, sfr@canb.auug.org.au Subject: Re: [PATCH] SLAB: Fix slab_test.c CONFIG_CPUMASK_OFFSTACK build In-Reply-To: <1260205363-6015-1-git-send-email-penberg@cs.helsinki.fi> Message-ID: References: <1260205363-6015-1-git-send-email-penberg@cs.helsinki.fi> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 41 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/