Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2524073lqp; Mon, 25 Mar 2024 01:04:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUoIEgp+rcVMkNJ9wxeIjizdS0PWQxB3qheKXrDItxS01m0DNQqcrbHfdek9tSrvHOggC+phPgETOoBTmfBczR5/4QSTT9wHNDgTG/AZA== X-Google-Smtp-Source: AGHT+IENcqIbXukGQv/kqLUPL8TS/5t/al1vhrnOjQuRc2BifBTVVY3jqqj2rMS08CrnevbJqRYS X-Received: by 2002:a05:622a:1743:b0:430:c757:45ba with SMTP id l3-20020a05622a174300b00430c75745bamr9032102qtk.27.1711353893035; Mon, 25 Mar 2024 01:04:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711353893; cv=pass; d=google.com; s=arc-20160816; b=KxQmUU7rq9DaZJlb9q6f2z1f70JnVgqXybHlum0S9PyiPKd46phjtASKj45u5l6csg EdGsEuwSByw1JM94BncfDMfZgcF+YOlVs6wuDG6F0tEsjer0rGMgxQUKbhLDv7InSyyr hwojlQBhBmyUEdbAPpSM8wkKiH/XN2cG0p8XDVAmRAhDdZSMaxIh2/jbn9RzEJj/38jn Q1cYjL4oHr5CmH6T2yyfAjMYswOgetCDD615Zsa1tLCz3/PnaP46wv9opsx4/DmHyIf+ n0HcUIc6XvUWINcOBL+sCUqxxmk9Yh1JS5pmbSyB9XPGkXA6OFp76FO6HJwOCglZUn69 n1JQ== 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=muXowQnkfMa9kcnp7i1C24jL3r6sk5jHystQdxCTpfbAt/xjaCCNzuQBJvGnfFob7v M+EjUnNJ9nREb5xmJlGE7yHYnULhIR3FDI2/U+d3h9LxdXw0Vdew2jHBkq1va9iqg94W Cne9PflwVHvb9G4z//GSYi0OTohVhZuA1rD75nVvsa1/Vmjb3GGiF+nC0L7ERnyYGPDI vqk6A2kC7oFu+Vgy7aJmmRE+6/UU7pHl9Oq7x+7ZN2/FK6D1MhegwMmWpJOVG2itBoRH 9TBHFol8M049ezMuCHzSRv9UCJvTXRaEPn3g8BxSc9s+SmqNmiS8T10sxKMn14e/QWvf r55Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Se9bkRgj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115758-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id jd16-20020a05622a719000b004313752c10fsi5471176qtb.484.2024.03.25.01.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:04:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115758-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Se9bkRgj; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115758-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115758-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BA0C61C2F3EE for ; Mon, 25 Mar 2024 08:04:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 781B636ACD3; Mon, 25 Mar 2024 03:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Se9bkRgj" 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 8ED901448F8; Sun, 24 Mar 2024 23:12:43 +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=1711321963; cv=none; b=o/EYQ118ojj4mY0Y45lKVgYyblJFFPenJcur67h0hz6psCA8o/txak4Bd32WSBIUoN7k/e/gnpBC1QY0T5fndX5trgp5tH17t0DNNCM4NU2KhC6Vbe8/uNK/uaraeQC7H1OXNWfjnS+TSclpc7QcgqxYOlQRmamSW4RO75TV6+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321963; c=relaxed/simple; bh=74kBJTUxv1Q4HgbcKWpYMeYUi0KuiFLvBp1n22KuFJM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kMzbZ9bjA9AnS4gxmLNGDjq+EDQwjtfuQUXDILG/mAkKrb7CEhe0ntF4YsmX/jDy9ZAeMgigdJFy94jVOy5bYmvg168fbcAE5cdoqI9Bjb4CgFd02RzNpaMYtGsyd+J8WqtJny8JYMgEJrzsb5efI3CA0mrkbs0mFCru54kirb0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Se9bkRgj; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB2BFC43399; Sun, 24 Mar 2024 23:12:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321963; bh=74kBJTUxv1Q4HgbcKWpYMeYUi0KuiFLvBp1n22KuFJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Se9bkRgjcslhztjaovvPXPhxO1Eb0A0vc9lwEXtRHhfl6pggZFHdHnmT8IJum4nOs +obc9jlHyUtNeQx+/oAq1UQr+7vPvg2BOScer1WlCzqaOoSCxGiMSsX92XYHV1Md/H UYfEKeZ3p57VaKBH3ML9kroa0P7v+yJE2A6VJWIkXY3UVaik7tGEsHfWZMc1lCm13g EK8zX8/JUH5F2XzT3nOO8q0hQgkjwudZpfnT75hHk6yhdPD0sAmK0/apT6gDogMfPc +d0e5d5xfiIeLvM1SkgYDW1RPeI3GzUjw/g5v1QW2ixzFqNBJQAEXtk9Pqgc9xoovd 5DzabkJ/MjtUA== 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.1 035/451] net/iucv: fix the allocation size of iucv_path_table array Date: Sun, 24 Mar 2024 19:05:11 -0400 Message-ID: <20240324231207.1351418-36-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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