Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2535719lqp; Mon, 25 Mar 2024 01:33:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVnk2JCCx7bzUTCGGn1Ku8b2JtSXpSFFiOTDaf5mQ+BKMAwQCl9Bz6E3qu0zNXJrSJGoX1pesJ6kPZQ158mhSTvJqCJzZ1i6lfAQOpv1A== X-Google-Smtp-Source: AGHT+IFx4J3RNTXL4Ux3UJpUSdSEZhDcwGav+pIBlF3Y2oFnX1/sRjn2ocnufJpcc/xFlcd8uxxd X-Received: by 2002:a05:620a:2283:b0:789:f53c:4e7 with SMTP id o3-20020a05620a228300b00789f53c04e7mr6150822qkh.67.1711355606078; Mon, 25 Mar 2024 01:33:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711355606; cv=pass; d=google.com; s=arc-20160816; b=J9zI59unw0jARdP/M4TJPj9IPJoQ6YkacRNNFwBTH1t9XUgiWHRHkI5MX429rLZiCh GEIUwrnYzRy4KmDC049P1Ty3LA2bgd8tHXMai4ptF7IIMBVyKyDNe4lfO1Fm1UBOKR27 SXCV70Zg1ZBHFjpv2fqRZ02MAZ4bUfOLUWE7w8JoavnCm7iQAyYsLye1XpFSXbUiNcNg lle32FzaGBYu+ukB+0WcNFGLVDmaq+oDYvclHOao/y8K4EUXcFYa4j7plAHoS7Mp6E6S zp/pNjADkjvjrP5dsO8q7OOCXywOp+YPwzPhzl1OrS/9GgELCba2kEPSZ51TpMKR27y3 SUrw== 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=B/Vih7NutecD1UF575l4pUpQtS3ntG09b4Xx05PvkVc=; fh=FXqWuu0Ku5f6Dh+Kbiq3QDiRCJeZTIU9vV6t5+L4/RE=; b=Hcjk3mnXDsDmZH8B8KkYulXvXyLvDN0hz4s0/rf7komHwPZdLHKPBT3mgzylk9WVMS 2yiJsycGZEIldpTdo/ntQfdxHzIXT+yK1pakcoqx8lsdXq22O97+bJetODg/dCZ5SfFu k76dDGgSkLlE6CfIqvzWXXmxVU0WGL3Jdhx8EvMnFUgewnQtAPhxICKBWmR+t+QteR+/ G3GkwiHGqLmZqmK6zTgYrjWKJGMmkdT98Y2lmZPk4TN1U6LtJ8D8iYBwCXpC9uvEDklO U9K6CKNSUZar88DJQrAO7LcmrU0VEO0SSHMy56swtD9nTV5+I7qSASK8m6OcbL7hyz2q jRXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XVvXBWys; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116120-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 f18-20020a05620a15b200b00789faaef7c7si5052946qkk.268.2024.03.25.01.33.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:33:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116120-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=XVvXBWys; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116120-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116120-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 C976D1C243FD for ; Mon, 25 Mar 2024 08:33:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 979A93ABEA2; Mon, 25 Mar 2024 03:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XVvXBWys" 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 360D417967F; Sun, 24 Mar 2024 23:40:45 +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=1711323645; cv=none; b=MjVvE0LmlC2s/ELXjOJhWXletWlqJszKbOrM1rvtVSxaagshspANU9+osKo1VNRcS4WxRg2xzSPuKzfeLMdFhZCKZD+UuCtSm95Xr5oiWauRdAoCQ0UoQmGJGa59XRSQvvJXrZ6wmZLWJsX8fWBa0LLPTlvHkBSWX5+bCtCtaEs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711323645; c=relaxed/simple; bh=/+JbcQspYtn1cfE7npVm5z6VSjqlZ5+MhDIb1KgxOJY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YTTkv0vLVUvNA4e7riS7lbuv2kRdff9lEvhRRQcW8pllVHAV2RAhxmrz3mVxADi0jzAqxzFLhvVdStaXIUkEud6n9BKKGj05cHkmJ8unCKxpiorVcwZXy8PMwGD7dDlPLOLHnvKP3vcKO1CRLoq9iKA3yU2FxTKkqLzp4Lu1ecQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XVvXBWys; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50D17C43399; Sun, 24 Mar 2024 23:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711323645; bh=/+JbcQspYtn1cfE7npVm5z6VSjqlZ5+MhDIb1KgxOJY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XVvXBWysHVCmnjORrhPtsPlGZ5e4DgWatojRcitez5bo9f9XKIuNfmgHOmFevTIK3 bzfrfGeEOFdPx0XrRquGRiPuFu04BKb+CHqS5u2bmXaiuDZ23GlfzG+LTGv08jzzxM OcwQxcoeoHeSfEtRVo6CR1pq5vqaHk4qH2QhoTX3jnsQF3S1KAyIZ/SgArvg6h5bjW xBQQ2RJ+dMOIILg9XZz+FL6Ca4Ws/Hsf/5JA5oNOySKQWxbsHIyjuVGTE5/8cT2IlK 6m9wavPD//Vi95oXQ1NvDYTYhRg/fwOJYuYFiYKttorOdhcyG1ZC0VSJAWNwHKvFTJ FICoFq97AXC6Q== 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 5.10 016/238] net/iucv: fix the allocation size of iucv_path_table array Date: Sun, 24 Mar 2024 19:36:44 -0400 Message-ID: <20240324234027.1354210-17-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324234027.1354210-1-sashal@kernel.org> References: <20240324234027.1354210-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 6f84978a77265..ed0dbdbba4d94 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; @@ -542,7 +542,7 @@ static int iucv_enable(void) get_online_cpus(); 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