Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp337663rdd; Tue, 9 Jan 2024 05:57:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEm/CBG13+sWitsdO7OqCKBTc5JkKLxNcSaMJIxgtQs6vwLyd61RZim+v15AguqhzcChTIq X-Received: by 2002:a05:6358:7255:b0:175:5e40:1fd3 with SMTP id i21-20020a056358725500b001755e401fd3mr2433051rwa.16.1704808672251; Tue, 09 Jan 2024 05:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704808672; cv=none; d=google.com; s=arc-20160816; b=cLtXfXznmfMLkThPLN0+mYKWUnT/IDUXDP5ZIuWxVfsco7ieMQUcjpaV1huD1+ZaWa a0Ss1vrTCQ3O1G+v050eW893s1cA+drNRiZ/5yarSwCIqpDJ+EFc3CvlvGVeCKpRgbry p90H2p3UtaGRM4yj9GJsMtJGAEDN3Qyk03HSh1aZcxzTN37GtyEcJUpb4XHmXlJ0LihW jQKwa4pcgHEk9AFV0ASnyd4gQM5kox7Ixr2UuVW/crI3QDpTUUS1C/1WoDRVClCmAnI2 IghDYcwzaF5Tf1wDBtdT//bzQAgJRi4/N5EibhQLoD9408sUAk8e9Lv25/Nhg7Q2JAFp AMGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=JJHgvOFzSW+JX3OnOy35lWmNxPoI3R11S86tQorDHH0=; fh=EEKsNnjcMM45o9Ser0o0TZ9xyaOYD8/5Et97uamJB7o=; b=YOJtdd0gR1RXLkBsJHLFOxyYcXwkxzroChs+5olsLiRonqj7v6b0MofpuBxWdH7HIP xmjUvYQqWAe6BXK7mF7Tv8UQOzX9XABgC0drI/GgqEz4nsdWZyyibgNOagl/lZDzjDCn geR20GSEQffdOD86yozVbHqpwKQg68+NcT9csS+Vt1e3a5Ew6/MECJKxwF0X0D3IYMMx QkYJtdT4n5SZs5j8tz4SH+nz0R8Bfz5lYimSA5DMdqrh41LXyuYbno1SYZutfZpUq01Y Sky/GSfPxFx7STiFiyL/VIkUlo58AhdFAZCiFobdUqDOn5Lh2Xs5oEoqR1tLCxGxCG0P zE4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-20926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id x10-20020a63db4a000000b005cee87f85b8si1465272pgi.348.2024.01.09.05.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:57:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20926-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; spf=pass (google.com: domain of linux-kernel+bounces-20926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 6EF38286564 for ; Tue, 9 Jan 2024 13:57:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3154439853; Tue, 9 Jan 2024 13:57:43 +0000 (UTC) Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (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 7142538FA3; Tue, 9 Jan 2024 13:57:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f170.google.com with SMTP id 5614622812f47-3bbe78dbd1aso348611b6e.1; Tue, 09 Jan 2024 05:57:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704808660; x=1705413460; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JJHgvOFzSW+JX3OnOy35lWmNxPoI3R11S86tQorDHH0=; b=DLrKJHtVG5KsYRHf2FQJXiI7N+CvxcwwV2lrZIxDDYaupXYtwFgr5+U4ImvI9QtAuW g/qBFqd1+LqrHTHjrMGQhMzEfX94kZIUVrnou+KfD+rRgKkGbUwmLpyQudvH72JPUNsu rtb7WPTSjKudrYCkuk9+iB1wN/AO3qb9V1En51rUPYfs3PEwwtW5YIuogkO1L2Lgv80Y hgKVDPvoUYXMcbBgPbm6Ez+9RH5dsXqVAFodKN1KT2IwvGhBxB4c77KrA4tW3x0GDykq bmXUP/aeTqx6ztpDI3oy+4ho3vPwo03rjW5nXr6vN948pLt66jpnzNaPpPuFts9uJo0B HWaQ== X-Gm-Message-State: AOJu0YyJ3ntPXy7SpbNyRNgd3gqGybkftZLVxBnekkW0c2g+xu3zIMT5 a6G3/muyHb4ebT3rD8STJB/J/k7KEH38w0VbnK8= X-Received: by 2002:a05:6870:65aa:b0:206:5411:f97b with SMTP id fp42-20020a05687065aa00b002065411f97bmr2250765oab.4.1704808660361; Tue, 09 Jan 2024 05:57:40 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240105181118.116292-1-erick.archer@gmx.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Tue, 9 Jan 2024 14:57:29 +0100 Message-ID: Subject: Re: [PATCH] PM / QOS: Use kcalloc() instead of kzalloc() To: "Gustavo A. R. Silva" , Erick Archer Cc: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , "Gustavo A. R. Silva" , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Jan 5, 2024 at 7:17=E2=80=AFPM Gustavo A. R. Silva wrote: > > > > On 1/5/24 12:11, Erick Archer wrote: > > Use 2-factor multiplication argument form kcalloc() instead > > of kzalloc(). > > > > Link: https://github.com/KSPP/linux/issues/162 > > Signed-off-by: Erick Archer > > Reviewed-by: Gustavo A. R. Silva Applied as 6.8-rc1 material, thanks! > > --- > > drivers/base/power/qos.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c > > index 8e93167f1783..bd77f6734f14 100644 > > --- a/drivers/base/power/qos.c > > +++ b/drivers/base/power/qos.c > > @@ -201,7 +201,7 @@ static int dev_pm_qos_constraints_allocate(struct d= evice *dev) > > if (!qos) > > return -ENOMEM; > > > > - n =3D kzalloc(3 * sizeof(*n), GFP_KERNEL); > > + n =3D kcalloc(3, sizeof(*n), GFP_KERNEL); > > if (!n) { > > kfree(qos); > > return -ENOMEM; > > -- > > 2.42.0 > > > >