Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1383240rdb; Fri, 19 Jan 2024 18:52:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7wGoYXbEHbxu65YuQSHmozIc59vgC2XANtw8RM979SOizOWpHp6pz6qNrA/T1mpFQlOlq X-Received: by 2002:a05:6870:1c8:b0:210:a8d8:4ff6 with SMTP id n8-20020a05687001c800b00210a8d84ff6mr898256oad.67.1705719125224; Fri, 19 Jan 2024 18:52:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705719125; cv=pass; d=google.com; s=arc-20160816; b=c2U+EbNbAHmPqtynvsCfCPCfM9VEzWfrJLeg+z8mGE7xfALArC12UfUls1CqHidybv zM5jQHxwkV5yUEOc3px46taYWIFfzHLkE4D4yfDie4465ZBUHJxn9DvYwE1g6o0gV5mq OoiQAuSpVctUq85/QHt7SUZ5kWw5b7mr2O+mh6UMbEGkhmZ6rGd9pO46VMOCzK1/Y4Wn o7xfkDOnN4fA6fyOsWOXOvnxChWsO77GrccR6OX40D/OSB+zqjPlhBjUPBfSq2hTmCl0 9zHA7reNegLJX1PvJ2o5QkXkwm20jDUvHXI6SCvRleVs2k31dA4GN6IlHSKMcYKNPu8u nl/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Fiqg7NMTo1hnms2N+QcuxP30iXk/HvqGHex9PC1KYAY=; fh=XBn6QOxXmd+a21rfOzAv6TsGVH//lL1yHr3TAnHgMoo=; b=HGDgJs/3AFR8uAnswtreTVfYEmedrnbJxL72hd1j4HFLujg18yn+s1jYdmqwkO31G0 60H6Guomnq+PGACBts0uGxeSZTHss4WvOjRL198ceaV6UwIxa1obqJhjYO7IjiiDpfH7 ruZ4ZMc0O58hLpH5lVWfLBDES3250FBNgSw3Yet9VGlmERpLWieyV53j+vf2h5gyK85o aLmSpFLbdYPxc+GIXVsEzWb3F1hHuKqJQWWL45sG5blmdE+kd5py4OukuMQwrEqtMLs6 To6uu6W9qjBYrTeUhrTd96OcAubXbgEnaUFUbYEkMPbEdEiWpH6EDGxsHDQRJ2RpZDcP l0gg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bR7Fsljj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-31688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id j5-20020a63cf05000000b005cda5bb89cbsi4374491pgg.163.2024.01.19.18.52.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 18:52:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bR7Fsljj; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-31688-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D21422815C6 for ; Sat, 20 Jan 2024 02:52:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 57274D262; Sat, 20 Jan 2024 02:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bR7Fsljj" Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C5D44433 for ; Sat, 20 Jan 2024 02:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705719065; cv=none; b=IbfYKpS/eamyfeM8OI4cYepUQPZ0VyAkulNJh4Xw4qQ4xikASBsDLhsjRDFd1uQBkxu+vNBUB922N2Wg+1EzGcNcqDsw2+xj2ALcXU1o/rEKdQsZHljLiSKhah6biRRzwekICTKP9G0WpJqxDYrgF+9UNtkvL0zjjlbRLcJVjgc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705719065; c=relaxed/simple; bh=WqwHpejzHYLP9GNl7XmZ/L5b8WXSUZCU6xYAFELj57w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fpYxqk/x0ZLVRd1p9RK//ZRyirUp2bvNTUrwFN8YJk9skHu3q5ArL1E3whEUYxku+PfL8TBNUAfauzaLUex9Ife/OrGX+nvZe1addi+PgQIB6Zkz/R628eXkcehOt18EdcbDO6hDZ5zDkiOgGTqLV0wf2XmR/f2AEULZvfiGBBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bR7Fsljj; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-5f0c0ca5ef1so14586417b3.2 for ; Fri, 19 Jan 2024 18:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705719063; x=1706323863; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Fiqg7NMTo1hnms2N+QcuxP30iXk/HvqGHex9PC1KYAY=; b=bR7FsljjrtlFfdBUEufn68brwa6QZ2Cbjj0mM7BgpD++YIOOZAy3UEg7Mb/w+Bn7sW ABo6PH30H8eQfbKQYyfahgUXtAJjJTGPHig8uUVoV7xkW7zsMbEPlZrDTuKq1OYe9HNy /Yd0lTQ2/NuRu8/dcTMC7VSpYJr1r+33wGu3mGGc/qZFqOZ+Hyse2/8BL79z/SsCaxlK i7AcuWhzBh+ftZrqbqqwTAExCngt0YItF9haoOHxapuTIEPVmQGjDgBP4GXGpt15CMhZ sIMKzpqEZCfsJUGUYSetQ0bA49GFNLWP7xBVPzcs+vrgUxdM4wkyl9CuVQStxUllGq3U FqTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705719063; x=1706323863; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fiqg7NMTo1hnms2N+QcuxP30iXk/HvqGHex9PC1KYAY=; b=AC4ManXu9+vNcpCZGRaqLSgbATXmmpySK0uR2oJ/XSw1k/dn2oeBkNQZ4nHYeIPeHX p0yRNMzqg/0KWHyd8/yBth8GcsgxrshbR39niaXGXEmuTv1ZH7xE83WBDayII6uPKbrz nb3slFNYJsi0omilEwTdwfiXEW2NvQR4E9t5HR/7lQJ+pthrmTFx+yXDzMYw790ffTOv x/p1AqpNfnU8Cyy4IStR4NL1sA61Kg7JtWJDyQ6DFfVEMJqGuxLBy5pvdLceXqdJ7eM/ uumldz/TIfQ/tYb+a1VVYpsaziuxTyW8mItmi9tzCW7WIyvDbQzOQ7hyYmCJW4Dy3jtC kpgQ== X-Gm-Message-State: AOJu0YwFkms9W0GIQhlERpfaTM0a+DhXpXcZywFbK3gkYAQ+hesVVBBn oWFI7dnj4jlWOEnIchL6/5lKAspUJZH9UFUZzo2iWu+0iNI0v4QG X-Received: by 2002:a0d:d4d2:0:b0:5ff:63e0:885b with SMTP id w201-20020a0dd4d2000000b005ff63e0885bmr787726ywd.76.1705719063162; Fri, 19 Jan 2024 18:51:03 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:2288:782e:a717:678d]) by smtp.gmail.com with ESMTPSA id s204-20020a8177d5000000b005ff8c88bea0sm1537740ywc.14.2024.01.19.18.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 18:51:02 -0800 (PST) From: Yury Norov To: Andrew Morton , Thomas Gleixner , Ming Lei , linux-kernel@vger.kernel.org Cc: Yury Norov , Andy Shevchenko , Breno Leitao , Nathan Chancellor , Rasmus Villemoes , Zi Yan Subject: [PATCH 5/9] lib/group_cpus: don't zero cpumasks in group_cpus_evenly() on allocation Date: Fri, 19 Jan 2024 18:50:49 -0800 Message-Id: <20240120025053.684838-6-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240120025053.684838-1-yury.norov@gmail.com> References: <20240120025053.684838-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit nmsk and npresmsk are both allocated with zalloc_cpumask_var(), but they are initialized by copying later in the code, and so may be allocated uninitialized. Signed-off-by: Yury Norov --- lib/group_cpus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/group_cpus.c b/lib/group_cpus.c index 952aac9eaa81..72c308f8c322 100644 --- a/lib/group_cpus.c +++ b/lib/group_cpus.c @@ -354,10 +354,10 @@ struct cpumask *group_cpus_evenly(unsigned int numgrps) int ret = -ENOMEM; struct cpumask *masks = NULL; - if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL)) + if (!alloc_cpumask_var(&nmsk, GFP_KERNEL)) return NULL; - if (!zalloc_cpumask_var(&npresmsk, GFP_KERNEL)) + if (!alloc_cpumask_var(&npresmsk, GFP_KERNEL)) goto fail_nmsk; node_to_cpumask = alloc_node_to_cpumask(); -- 2.40.1