Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932517AbbLHB3B (ORCPT ); Mon, 7 Dec 2015 20:29:01 -0500 Received: from mail-io0-f171.google.com ([209.85.223.171]:34202 "EHLO mail-io0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932395AbbLHB3A (ORCPT ); Mon, 7 Dec 2015 20:29:00 -0500 MIME-Version: 1.0 In-Reply-To: <1449478184-27168-2-git-send-email-mingo@kernel.org> References: <1449478184-27168-1-git-send-email-mingo@kernel.org> <1449478184-27168-2-git-send-email-mingo@kernel.org> Date: Mon, 7 Dec 2015 17:28:59 -0800 X-Google-Sender-Auth: HlqEbE0eTkF2Fh4bKuhHg9kkoAo Message-ID: Subject: Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' From: Linus Torvalds To: Ingo Molnar Cc: Linux Kernel Mailing List , Rusty Russell , Peter Zijlstra , Sergey Senozhatsky , Xunlei Pang , Rik van Riel , Andrew Morton , Thomas Gleixner Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1107 Lines: 26 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. Linus -- 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/