Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp147473lqc; Thu, 29 Feb 2024 12:57:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVO6+o8sF8ZXSiVcZL20z+t/nh+yxiS0aJCMnzYoOZ1OJyEQ7UiCJ/lUllJERNoHYtA3ezcqW7Os41N14VihxY9chP2+yQ4sBTky8W8lg== X-Google-Smtp-Source: AGHT+IHK/j9zgn48Zurl1qamTm5g2RO7hjmPSOVm4BhK0KA+X9ecjTcPgvEX1NG2k/Cmf5dhXOen X-Received: by 2002:a17:90a:de82:b0:299:1d33:846c with SMTP id n2-20020a17090ade8200b002991d33846cmr182806pjv.39.1709240251156; Thu, 29 Feb 2024 12:57:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709240251; cv=pass; d=google.com; s=arc-20160816; b=NE/WQNEMJv+QWKVKNIzUY17gXJIXygahIx/H+wLrtaqyp22oHn413g7NFDcjx/Iq35 fhxRloPI+B6Sdd984iElOZKriJ3AqTqMua8AUuTeTZ9bLb1whDYYfgofQY5qxcsmbxDg k9YZzXPHUqf0eaGXtzptj++jpNjSjniVlSVQfnRmNu2u51qgpiuK0m6vlOHDWq0C/dTr ob6hg0wqjVwy4JzB/osUmRx0QECJsMHMv3x7kso+bPHY6Ii17jDE6YwAE6wYx+p87AHs S1EihdR4EyS1uP1ROvxiPQ54jccZPi72l4MYrxNQxHJk7DrJW4IMJ1AVNkLiasPmfI+e hMfg== 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=URLEW9LfUV+baOHwYS0HmzpdLQnueeY5VBW214JW6Zw=; fh=h+dhbFjixouGGBVXBL7mO6pA5ciqY6YTYMYwlP+ng1w=; b=l/zQzmwK80USGXLG2z/W9YqHfL1AqRgj1Bw+zzLKFTuKHtZwHQbSV3MFg5H8JEvits 2aHn928y+vVDdzxrTcvMaGrMni7S2191QhGDd5XT2ChUYKNr7v1meI0N7nhBaNdFIcsw gKjOgUfzSSEUqgwtPF2EtgDkOhFvEhLo5EXhi057LKQiE7hNiZExYX80AFh60hYoOiyg xBS8SpXVl/NDlopofuFPtaXSXo/oGK1HSOZSevHmxb6Hn3l5vq4XJAfwz14+mucBHb/l x9NcT+sLB5FeeO6e9vOirGZIARGF7Yw/LyVzYG77oKb6lxsHgA375A8+tdNdyYzaGsml 7xyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OndRqQVv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87501-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 l19-20020a17090add9300b002964c7d3e30si4100722pjv.45.2024.02.29.12.57.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 12:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87501-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=@kernel.org header.s=k20201202 header.b=OndRqQVv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87501-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87501-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 D35ED28443B for ; Thu, 29 Feb 2024 20:57:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CA831509BE; Thu, 29 Feb 2024 20:41:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OndRqQVv" 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 4D7A1165911; Thu, 29 Feb 2024 20:41:19 +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=1709239279; cv=none; b=V/dN54QJPwsIn83Lpb/QMKobjDfNivnwtiqSmI3mPhyxMsIMGhPtect1xPrl4lIyIzQa3/JHmP+Hg+cZs5j2i9W/K7z4Ya4dXCwVE5AWx4dAgVcGE0cwo0Q95wq4x4rVJ0zDq3i2cXj1QHuX1ontoVbcRkENxyWRsZdP1oSE4zI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709239279; c=relaxed/simple; bh=+L8wkVGdqLlELuYmKWeEuKakPfIif0WoiIE0dd9miA8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XbmKrrYRJzQstp3UTX/6cXKhiyN/BOkuxoB/rYIMtNhkWT9LTF5wHMPg34KXLZjCYHtsCQqYf54DQqwvvmNGKaTt4i6g7VdvDXKYQhNtq4OrYfKV0J0HKOJu8FN14fGTC7xuVpirjhM3+CoS+/Kj9aRr0GKKEdb0quV6KnIsp5A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OndRqQVv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE65EC43399; Thu, 29 Feb 2024 20:41:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709239279; bh=+L8wkVGdqLlELuYmKWeEuKakPfIif0WoiIE0dd9miA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OndRqQVvlze3x1yuDANXwUWxTwq6IFtU6SXWL/ECRq1h9VVGuzQLwWWszlAjBoYRA qLS9BNjVfaoTMB4rF3Xu8uILPeOd3v9m95RAUs/+ZJo5LKm2aqhfR1BfTYgJDsFlXR YISNRR0C8R5JCGQ9FnbEH6NA70TyhLSsl+5JVwob1Q7C7jBXHcUdveDq3bFwkfhY1d gix2PYvAnMrhI8K8HlNpSD38JhT5snQ0CQjF9nH84VEu6nTXUPdvLKo3q1dTO5faPS vFAcVz6fQSVBDBzuHwEaHt38dosY2FqG/DJIMSQvRhjPcFplHGYSu9i8+tX79zxczF 69105rmcztyzQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Alexander Gordeev , Alexandra Winter , "David S . Miller" , Sasha Levin , twinkler@linux.ibm.com, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 6/9] net/iucv: fix the allocation size of iucv_path_table array Date: Thu, 29 Feb 2024 15:41:02 -0500 Message-ID: <20240229204107.2861780-6-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229204107.2861780-1-sashal@kernel.org> References: <20240229204107.2861780-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 X-stable-base: Linux 5.15.149 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 8efc369934fc7..68edefed79f16 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