Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2533239lqp; Mon, 25 Mar 2024 01:27:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPCdCMjZ8Ie8tNlAAekGTlceQekkUX5C4UXU+5GWzB02crvh31yigkTi0snmJFjYw+pHip/M8QwOOJT9JFmy3LjXCXzqC1JZMm5jS4CA== X-Google-Smtp-Source: AGHT+IF2nsbyNwxvQ+7YzfEsq1GoeF7uARu792MuqHdp65yB1hICq9MLuleHfaKXbcpBzmEORdcZ X-Received: by 2002:a05:6a20:4321:b0:1a3:bb1a:8223 with SMTP id h33-20020a056a20432100b001a3bb1a8223mr4245595pzk.23.1711355240942; Mon, 25 Mar 2024 01:27:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711355240; cv=pass; d=google.com; s=arc-20160816; b=rtxHJDktaaRSncqzGxJP3pc5DHZMQtEip0r++VK+cCmWFOPpC+OxE6XEYa+stOMR+Z Y8yM2aBdOwaIfykZ4mR8yIDISbd+QEso1f1O444jq7eBDtkd7cswUCZdAgMqL+fB8PNp Lb7k2fgV1csHtWRD6DJXR/QcYj2ULfsfKp+3oFIcQkmwhNGsSmVR2sPH/q+v2Rqa4zVs CZhT8xRPp0ryU/LG9ggV4fSIQe936iR39CDDlShABBhH2qMQ1ZAL8Hin2pGnIA3MItwi 8uL/wgahDvGpJNGXRI7syBTez5RqKRdt6yyR7QXoTCdb6s8jjVMMjLOTcr1Z3hz6e1+1 JsoQ== 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=2rUtKgbc9vDbwN+2/86mDFy0acQTj1Y6HgzUyaeRrlQ=; fh=FXqWuu0Ku5f6Dh+Kbiq3QDiRCJeZTIU9vV6t5+L4/RE=; b=Fdg5nqz73hLwEKj85Eiyu3xiPWDxiq7Ce3VNv1EibFOcuuSQMfnLeslqm6SHjITGfy Erwyub4RE8CtQyMe4o6s6IFLPtRdGdmuEhaDXODHw2XG5Z7TFXVEYlcDSqnemN2ofkAj hvcl1srRYYiK16koiua8FSKkJFJm+ztgy9DEtc4o2TV0oVPellg3XC/0J3lY9f9+szkA cDEBUVno4Wn9OYgslVFa9lxLwPC6eXqN1sMyTXebf9Uo27MKGHr/rPrXOUD+XiD1Iucl op/IWjEO57Cob92FZ8/AWZh+4eIEDsVmKHd8EjJpfEgUyBZ+QW8Dex2q+DEL9ZKGa2lr CDqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sj2iaNlD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115594-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d16-20020a170902b71000b001dcb654d1b6si4495920pls.168.2024.03.25.01.27.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:27:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sj2iaNlD; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115594-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115594-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0CA91B3723D for ; Mon, 25 Mar 2024 07:50:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CBDD82519AF; Mon, 25 Mar 2024 02:47:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sj2iaNlD" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 044CE1FB711; Sun, 24 Mar 2024 23:01:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321307; cv=none; b=IJRwDdDQSzEmdQW6QpwiAkvsId5eMyhv5rQLdZFeXFjMdRldCamq3rLtaDR19SkMvIgZ5B/Nup6sNSQZskwozVL21yCFysnroGflxznI/sc69/eU001NF5AmQQXpg+h8Vecw5ykk6U1Zqq8cRg+/5PKn5xdZf3ZbOdBaueiZ/PA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321307; c=relaxed/simple; bh=74kBJTUxv1Q4HgbcKWpYMeYUi0KuiFLvBp1n22KuFJM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CoYZHeA7L31hdygopoiihcV1b2oZ4X5MyhPv4tz/QLEm+mWdIhY8TNqvdnakz63ag+fSbgjuEvUv2TAPoYIpIO0EjAFqahyOPQV4SfdZBDswHTczsKsOQB5xkduXWTd0OAVAJGkFMr2hA8Yi/7DwZX9UZ6uqEzFInDPiwNAloQU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sj2iaNlD; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D429AC433C7; Sun, 24 Mar 2024 23:01:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321306; bh=74kBJTUxv1Q4HgbcKWpYMeYUi0KuiFLvBp1n22KuFJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sj2iaNlDZFeJT3jT66ppwvepPePxrw4F/qxUz0yboGgGElS3AKaDWv1fXNwcK06Gf p3nAFM6YN1+4Ds1xBI9DO3ONI259WfY0QJEvp/zbQwA82G1/RtCa/ZRPvVA/SWQwkg jqUu0ACYx2Rftl2uP8fYQP06htHoXzFKr+5Dc5KcPP4bXY4iJe6kcy7kSug04183I3 GcO27dNdcZfDAdlB5GHGNrk1d5VNCP3DldjF6pYYKqGsjPZXUCIHm23FaqBlaJP4rj 2V6OSQdx+dYk0OMh+yAvAyet0GlRGVPycBBTKzVHdeaiSkeAvWHv0AsHNtMHTVUGCp vguDFYmbANm7A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexander Gordeev , Alexandra Winter , "David S . Miller" , Sasha Levin Subject: [PATCH 6.6 029/638] net/iucv: fix the allocation size of iucv_path_table array Date: Sun, 24 Mar 2024 18:51:06 -0400 Message-ID: <20240324230116.1348576-30-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324230116.1348576-1-sashal@kernel.org> References: <20240324230116.1348576-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Alexander Gordeev [ Upstream commit b4ea9b6a18ebf7f9f3a7a60f82e925186978cfcf ] iucv_path_table is a dynamically allocated array of pointers to struct iucv_path items. Yet, its size is calculated as if it was an array of struct iucv_path items. Signed-off-by: Alexander Gordeev Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/iucv/iucv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index fc3fddeb6f36d..f66b5f74cd83a 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -156,7 +156,7 @@ static char iucv_error_pathid[16] = "INVALID PATHID"; static LIST_HEAD(iucv_handler_list); /* - * iucv_path_table: an array of iucv_path structures. + * iucv_path_table: array of pointers to iucv_path structures. */ static struct iucv_path **iucv_path_table; static unsigned long iucv_max_pathid; @@ -544,7 +544,7 @@ static int iucv_enable(void) cpus_read_lock(); rc = -ENOMEM; - alloc_size = iucv_max_pathid * sizeof(struct iucv_path); + alloc_size = iucv_max_pathid * sizeof(*iucv_path_table); iucv_path_table = kzalloc(alloc_size, GFP_KERNEL); if (!iucv_path_table) goto out; -- 2.43.0