Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2352863pxb; Mon, 20 Sep 2021 19:50:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyoiaDT+TJi2OilgwEzcHS9aL/N1jofggW8PhwMyEvIG3iCPWJC0oFog4/Vs/PkE9zxVAES X-Received: by 2002:a17:906:1b08:: with SMTP id o8mr32472505ejg.21.1632192624536; Mon, 20 Sep 2021 19:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192624; cv=none; d=google.com; s=arc-20160816; b=yThU3pdZHm6nSRp2+YC/5arKy1N/Ud7Wc+z23q7/L2KsaKn2brzVQC+PZtspqUgCYN QQy59LIAAmgmh9bjCuqzO1dX7BChSZFjHO1+3r0Z+oTKaFcwAYR7Rk5sr1vcsj5Gg1Qu kMMf8L4V5Cykwe3nNjUlEEsCguPYas2g5U2YvBFq4uCvrUiDUms25t6kejrXwEQnMIBi vqDNQSlHKSSdkCA2Z3Rav3Cq5l+KD6mj8LAb0fkIaMlMTzNAEH3Jev0as9GQYHToyKbQ 2M5n0awPh1NEkL2xWQO3rTqCu81xAX4XU/1oJgN81AzyGFqlQF+oPUTATjcF05C/OyeU 0PeQ== 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=E9BblX/3yvFA3hv4mjuFIYezt5esQy2l8dTfl4rOcA4=; b=oV30ObiMCjdT5bUd+LVlB8IdmmTt22tiefvZExJQpabc1VFa2RyFAuu5bU+6O8Qxbr +ixg0l4tZzLj3Trlg547C3rqW3XOPLyPNWJGRUwritQT5WT74eG+FT5Nt/9/lPRK8jgZ ycuaQpjIlyIe6w+kPHADJkS2YZXvFjDNmrT9pASTtjM/1fByxOHOy6b0VcweocgrbbVV KoyU9eC7ZvUKDUWOhQjddXNycn393DKOOLh4lRYW2VfGhivpyheC6aLo8fuNZT6v2v/g 8ENPxdpqEnru0B1aUaK16dbAlUy+Yp08CUwIDIYTSIFXB5DqMoWHrFl4of2pFaefqnBN CS5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NzL82nYD; 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=pass (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 k12si17933384edl.625.2021.09.20.19.50.01; Mon, 20 Sep 2021 19:50:24 -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=@linuxfoundation.org header.s=korg header.b=NzL82nYD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349667AbhITSll (ORCPT + 99 others); Mon, 20 Sep 2021 14:41:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:53084 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380297AbhITSgY (ORCPT ); Mon, 20 Sep 2021 14:36:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5486761406; Mon, 20 Sep 2021 17:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158963; bh=T7SIofURIVF3X4OIUNNKYwN8beYr8BiPk7L0p0U2Lig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NzL82nYD4a0FzoF3L2rABXMQeyQXfd8D9F0XJ6ZM5M2tBPQfpeKZK1Zx6uUoNfHu0 T2LQg/tXK6X7Ps9Cb/hCMB41tqD3veo+4TMuTxtEwHqG2IVCoDEyEaocu6OLpE58Kw 5O97jG/fqmAHl/g8s+M4L5QvM7xkKIB4/F5AxQfw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Ernst=20Sj=C3=B6strand?= , Alex Deucher Subject: [PATCH 5.14 014/168] drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10 Date: Mon, 20 Sep 2021 18:42:32 +0200 Message-Id: <20210920163922.119271099@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@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: Ernst Sjöstrand commit 67a44e659888569a133a8f858c8230e9d7aad1d5 upstream. Seems like newer cards can have even more instances now. Found by UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:318:29 index 8 is out of range for type 'uint32_t *[8]' Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1697 Cc: stable@vger.kernel.org Signed-off-by: Ernst Sjöstrand Signed-off-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -757,7 +757,7 @@ enum amd_hw_ip_block_type { MAX_HWIP }; -#define HWIP_MAX_INSTANCE 8 +#define HWIP_MAX_INSTANCE 10 struct amd_powerplay { void *pp_handle;