From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754390AbbCBXoS (ORCPT ); Mon, 2 Mar 2015 18:44:18 -0500 Received: from ozlabs.org ([103.22.144.67]:44376 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752227AbbCBXoR (ORCPT ); Mon, 2 Mar 2015 18:44:17 -0500 From: Rusty Russell To: Paul Bolle Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/16] CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS: set if CPUMASK_OFFSTACK. In-Reply-To: <1425299648.24292.118.camel@x220> References: <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au> <1425299648.24292.118.camel@x220> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Tue, 03 Mar 2015 10:10:48 +1030 Message-ID: <87r3t7j7cv.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Paul Bolle writes: > On Mon, 2015-03-02 at 22:05 +1030, Rusty Russell wrote: >> Using these functions with offstack cpus is unsafe. They use all NR_CPUS >> bits, unstead of nr_cpumask_bits. >> >> In particular, lustre (in staging) used cpus_ and that caused a bug. >> >> Reported-by: Oleg Drokin >> Signed-off-by: Rusty Russell >> --- >> lib/Kconfig | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/lib/Kconfig b/lib/Kconfig >> index 87da53bb1fef..722427805220 100644 >> --- a/lib/Kconfig >> +++ b/lib/Kconfig >> @@ -398,8 +398,8 @@ config CPUMASK_OFFSTACK >> stack overflow. >> >> config DISABLE_OBSOLETE_CPUMASK_FUNCTIONS >> - bool "Disable obsolete cpumask functions" if DEBUG_PER_CPU_MAPS >> - depends on BROKEN >> + bool >> + depends on CPUMASK_OFFSTACK > > This removes the "prompt" from this symbol's entry. And nothing selects > it either (not in next-20150302 nor in this series). So I think this > just disables this Kconfig symbol entirely. Ie, it can't be set even if > CPUMAK_OFFSTACK is set. > > Should this entry perhaps be using > def_bool y > > instead? You're right. In practice, I used a different patch to actually force enable it. The final patch deletes it altogether, so I will just squash the two and this will never appear in the final series. Thanks! Rusty.