Received: by 2002:ab2:3b09:0:b0:1ed:14ea:9113 with SMTP id b9csp150842lqc; Thu, 29 Feb 2024 13:03:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUVLuXR8zu4GhV5zYQHUjBl/FBDOVGTv/NTIK3QhM7IhRrPBTaXm/bUXLaZCGb9g+f8ZA+Hl5VP2a2SofQMn2whgH7Kn9Mpz+s6smFoJw== X-Google-Smtp-Source: AGHT+IHcXdWCaAdM7VDtRoZ+cGUaOor/7GeZJupPdaOB9L+CPRIMeSrkqeDZWB/sDLPOESdlX7/C X-Received: by 2002:a05:620a:9d6:b0:787:80c3:fc1d with SMTP id y22-20020a05620a09d600b0078780c3fc1dmr3196114qky.49.1709240593076; Thu, 29 Feb 2024 13:03:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709240593; cv=pass; d=google.com; s=arc-20160816; b=OEdhCEfipN7Zb9s5kHDN4tG/LhLmdqOgUMXgwG/7+M87qIXi9ThYv3DjZdm73auuri GvMRP9r2PKYOL03unzVYy7SpCDKKr5KfMOYFZFLgOvecufR0Aabdynvw4efpAh6+4geo 9sXAKdaN9dAPtT+UlHcut54gzi5vXvCEYVy1scaL8yOnhTeb/NfhMJsn+I9xWERHnt+D mU6c7Veja03GfrmsNzaChO0LRsAGUa+nbUUyf3TIT48KeqiETuWiwC02eou/CZtazPNP iT9VK3K0/1R+mBkB35dqqdbncpV++Bb8GSt+/PI05Ka/T0mzt4gdOsiFc9aOgnSPmMkP bg3Q== 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=/Nmaru5h+xjjphQTJ5tGXkszqoXdqDdgD9BCn5226Q4=; fh=h+dhbFjixouGGBVXBL7mO6pA5ciqY6YTYMYwlP+ng1w=; b=n1ksUUDE0Y2ZwKFOIXRvuKdeo1KGdvAP94SJveTia89HEdGdiLV5XwpKwYGSzDk/BH zdGZeE5+NpNraC6f1x3IONVUlYy8pAi0JvUcHhqzzvYpSck0KPEHvWn8xI/pqJb2sUxQ spUnBHne2owOVdg2lAu54SYSuZTYflhjdYSOBgaqasbYmM4Td62J+ysivrNLjDhhNp19 /oGVP54hDLTRlL0fzJsC+oFlueleo0LM2SjzEsCDjFmweI+CF51tvBMaITcChu2ldW+2 LWguK6o/VQm1tNy/7O+4y4ukqzNh8ssxp7D1uW/E6goJocMaBa9pu+GlqhJk50xnZUrn 5Wtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HzWTRaSm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87523-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d8-20020a05620a136800b00787b94c8128si2175334qkl.325.2024.02.29.13.03.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 13:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HzWTRaSm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-87523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87523-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 CA3BD1C22935 for ; Thu, 29 Feb 2024 21:03:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69CE816F87F; Thu, 29 Feb 2024 20:42:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HzWTRaSm" 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 63FF816F866; Thu, 29 Feb 2024 20:42:12 +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=1709239332; cv=none; b=Zy+Yl7ER3dI/cjoI823WnsDS7QC14rqfM2awAr0HKO/vINMj14B1CMVT0LKRMqdqSeE3h36hxDqywGQqhlpD2zSz/uuupK2keCG3fpqvKcoBmy85ToQjNMWmqcpmb5hUIse4dQfAIpZ612vWNJcDJXCvXLMsH5YB+7OdR+dp3xs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709239332; c=relaxed/simple; bh=1jDYd53jim3o+DnL/gcsQfkGwzdeqRP4MNNLaXnXoPo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=p9Vchc4EiNXop+trgyrvLJpG5kLyWbB6Bxd0HoeSXhQF5lVno/T12e3Lf1qEpKzBpPkXmnk+cY24cuZ6j4UnN1MTpIQMO4D4EIEmW1I6aqkwdh41cNK7/sI1DAYsDkuK2TEVb6tRzKSAFRqZVrGwfznOmfp9hpH+mkW2zkqoXGQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HzWTRaSm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7395DC433F1; Thu, 29 Feb 2024 20:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709239331; bh=1jDYd53jim3o+DnL/gcsQfkGwzdeqRP4MNNLaXnXoPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HzWTRaSm7EIJXkUA0Mv21/vLxudZiAt8gSZqXophOtKAbifAGi4O1QLvFSS99wq8D I/FdOER5CqXSvXGQDiOHpnUJrVYH1syqZUPGj0I/bCtgay5FeeDOWgS2YA3iKMStf6 B7rBxa/a/kLa+iHMYGIlfYWLqf9gxF1owAMfGK9RpE+JF/7A+j8fU5hUY0YOPeReqm nsQlUyNhfAfe3uKCzI21nFXh+Jx84H/Cm5wWp2GGZ0O2mOskg18Xbza5T33deJL/2g EzaIJBCmwc92XbVNet/JcNmUUL+eWjEVMptNs/wfhL0ow/HX1xhByq6Zq8hcb3EHcb YYyn94+J4Gn1w== 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 4.19 2/4] net/iucv: fix the allocation size of iucv_path_table array Date: Thu, 29 Feb 2024 15:42:02 -0500 Message-ID: <20240229204208.2862333-2-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240229204208.2862333-1-sashal@kernel.org> References: <20240229204208.2862333-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 4.19.307 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 aacaa5119b456..da4cee91fc63d 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c @@ -192,7 +192,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; @@ -603,7 +603,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