Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932563AbbLHEJK (ORCPT ); Mon, 7 Dec 2015 23:09:10 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:33556 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755811AbbLHEJI (ORCPT ); Mon, 7 Dec 2015 23:09:08 -0500 Date: Tue, 8 Dec 2015 05:09:03 +0100 From: Ingo Molnar To: Linus Torvalds Cc: Linux Kernel Mailing List , Rusty Russell , Peter Zijlstra , Sergey Senozhatsky , Xunlei Pang , Rik van Riel , Andrew Morton , Thomas Gleixner Subject: Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' Message-ID: <20151208040903.GA31689@gmail.com> References: <1449478184-27168-1-git-send-email-mingo@kernel.org> <1449478184-27168-2-git-send-email-mingo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1285 Lines: 34 * Linus Torvalds wrote: > On Mon, Dec 7, 2015 at 12:49 AM, Ingo Molnar wrote: > > Xunlei Pang reported a scheduler bug in init_rootdomain(), which is > > caused by improper use of alloc_cpumask_var(), which results in > > uninitialized cpumasks being allocated. > > > > No-one noticed this scheduler bug for a long time, probably because > > alloc_cpumask_var() does result in initialized cpumasks in the > > !CPUMASK_OFFSTACK case - which is the vast majority of systems > > out there. > > > > So migrate all alloc_cpumask_var() users over to zalloc_cpumask_var(), to be > > on the safe side. > > Ugh. I'd rather just see us say that "allocating a cpumask always returns a > zeroed mask". > > There really is no reason to ever not zero it (they aren't _that_ big even on > huge machines), so I'd rather just get rid of the "zalloc" version that is the > less common one anyway. Sure - that was my original suggestion, will reshape the series to do it like that. Thanks, Ingo -- 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/