Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1124327pxx; Tue, 27 Oct 2020 08:48:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdkdzb1JPqZ+qji1o88Yr2jDSrD4c/0uYf5+FgUzBGnBdeR+3kdVqft6qbJYE1v+E88No9 X-Received: by 2002:a17:906:bb14:: with SMTP id jz20mr3154370ejb.424.1603813714088; Tue, 27 Oct 2020 08:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603813714; cv=none; d=google.com; s=arc-20160816; b=awy7lvKB0HxYmotVUJHVcyzxaaF+EuUFlHOxJOYg8w36LLskfbemCOMOOowxuP1qFo kg69rNjnlfYu6yt4j8FzF5pGh034x9rocuoIj/09j6EeZCyk7w4A6TzCjeilpF6IjGcx OkkfDvvLZ9WTeYmszds/Qv8ou5gnnpeXBQdOb1TOPFhI/UsMQe0irtoBjlBu5/4WgTqL L/xjPMRR/BsLqy4YyUos8xGeiwftOSMrSw2nGtKwKAJWF9XllpYlz5iUqEtDuthG3N69 vK1MQWFBCNNVs8nY+iM+FxSrLwIdUhUMDUPAAUYbW1bDD75B2ie2aLeLX+I633hhblkl BjsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=s4/jMNXJ4SfH2SYE5VCYRuKkFF/s7POBQneYej1FL8k=; b=1F2N2C4+HlaXv+wc3EEF0hQx/H66BJVpMACWQVPTFsg/z2ySO51QOUoIMeuvVKcOyE jxr7DOGmykg7RMnWBpgrgiiG4etBo/72a51hGRgVow6XZC2FNpm3cf/HTvohd8xAQ29K LyO0fsN4U3Uf0nEtem6eeKAbESSWHkNGPXJlQdoB9FALsTnYR7xrDb7EyispyHnCFfAy qe26OWxjVaj8SK5CkS0zGqbggzd32gCn2fdAF2Jm3RQ268ycWehau9Bs3hCTeEtO7vYy FzG6WjkM3kJlDj8TSJRfrb3n2XADnq9d9n9V671PmwkDRwuUE/eyqylv+9E7p104/g0D WNSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SaV2BkkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u21si1286130eda.513.2020.10.27.08.48.11; Tue, 27 Oct 2020 08:48:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SaV2BkkB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1782647AbgJ0O5Z (ORCPT + 99 others); Tue, 27 Oct 2020 10:57:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:45590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763944AbgJ0Opl (ORCPT ); Tue, 27 Oct 2020 10:45:41 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91D8E21D7B; Tue, 27 Oct 2020 14:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603809941; bh=7V9wtvwdCQLMZ8tHmSfN2E3T9IbfUcLtzn8OQH3qIUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SaV2BkkBFbe4LLx3hcJtRVz3x3toqcFfTAXnj5WgJ+31m7guYnXrOYiop2whuxKx5 CvRZVUL8fj2PVCI2Bx7gSucyfJ2Tn8LpDem8/Or/wZ5mZ+ZnAqcehRx2Yzg/OAphDa t1U6iWaniKClCrOzKrJGQPjTU2NCAhfe/bgvIgFQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhenzhong Duan , Rob Clark , Sasha Levin Subject: [PATCH 5.4 373/408] drm/msm/a6xx: fix a potential overflow issue Date: Tue, 27 Oct 2020 14:55:11 +0100 Message-Id: <20201027135512.303691610@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135455.027547757@linuxfoundation.org> References: <20201027135455.027547757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhenzhong Duan [ Upstream commit 08d3ab4b46339bc6f97e83b54a3fb4f8bf8f4cd9 ] It's allocating an array of a6xx_gpu_state_obj structure rathor than its pointers. This patch fix it. Signed-off-by: Zhenzhong Duan Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c index 691c1a277d91b..dfcbb2b7cdda3 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c @@ -834,7 +834,7 @@ static void a6xx_get_indexed_registers(struct msm_gpu *gpu, int i; a6xx_state->indexed_regs = state_kcalloc(a6xx_state, count, - sizeof(a6xx_state->indexed_regs)); + sizeof(*a6xx_state->indexed_regs)); if (!a6xx_state->indexed_regs) return; -- 2.25.1