lkml.org 
[lkml]   [2021]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 198/260] drm/amd/amdgpu: Increase HWIP_MAX_INSTANCE to 10
    Date
    From: Ernst Sjöstrand <ernstp@gmail.com>

    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 <ernstp@gmail.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    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
    @@ -762,7 +762,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;

    \
     
     \ /
      Last update: 2021-09-20 20:37    [W:3.223 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site