[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-stable-commits
Subject:    Re: Patch "drm/amdgpu: Check for valid number of registers to read" has been added to the 5.4-stable
From:       Trek <trek00 () inbox ! ru>
Date:       2024-02-28 11:41:10
Message-ID: 20240228124110.10a0a2c2 () enterprise
[Download RAW message or body]

On Sat, 24 Feb 2024 08:36:35 -0500
Sasha Levin <sashal@kernel.org> wrote:

> This is a note to let you know that I've just added the patch titled
> 
>     drm/amdgpu: Check for valid number of registers to read
> 
> to the 5.4-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
> 
> The filename of the patch is:
>      drm-amdgpu-check-for-valid-number-of-registers-to-re.patch
> and it can be found in the queue-5.4 subdirectory.
> 
> If you, or anyone else, feels it should not be added to the stable tree,
> please let <stable@vger.kernel.org> know about it.

It seems you are applying again an already committed patch, see below


> commit 372f39b1ccd3c61def56a711094e42342251b07e
> Author: Trek <trek00@inbox.ru>
> Date:   Sat Aug 31 21:25:36 2019 +0200
> 
>     drm/amdgpu: Check for valid number of registers to read
>     
>     [ Upstream commit 13238d4fa6764fa74dcf863d5f2227765b3753eb ]
>     
>     Do not try to allocate any amount of memory requested by the user.
>     Instead limit it to 128 registers. Actually the longest series of
>     consecutive allowed registers are 48, mmGB_TILE_MODE0-31 and
>     mmGB_MACROTILE_MODE0-15 (0x2644-0x2673).
>     
>     Bug: https://bugs.freedesktop.org/show_bug.cgi?id=111273
>     Signed-off-by: Trek <trek00@inbox.ru>
>     Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>     Signed-off-by: Sasha Levin <sashal@kernel.org>
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 26a1173df9586..1f4acb4c3efb8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -650,6 +650,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
>  		if (info->read_mmr_reg.count > 128)
>  			return -EINVAL;
> 
> +		if (info->read_mmr_reg.count > 128)
> +			return -EINVAL;
> +

these two lines were already applied


>  		regs = kmalloc_array(info->read_mmr_reg.count, sizeof(*regs), GFP_KERNEL);
>  		if (!regs)
>  			return -ENOMEM;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic