Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Pierre-Eric Pelloux-Prayer <pierre-eric@damsy.net>
To: "Christian König" <christian.koenig@amd.com>,
	"Mohammed Anees" <pvmohammedanees2003@gmail.com>,
	alexander.deucher@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
	simona@ffwll.ch, srinivasan.shanmugam@amd.com, David.Wu3@amd.com,
	felix.kuehling@amd.com, YuanShang.Mao@amd.com,
	pierre-eric.pelloux-prayer@amd.com
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/amdgpu: prevent BO_HANDLES error from being overwritten
Date: Wed, 9 Oct 2024 15:52:19 +0200	[thread overview]
Message-ID: <dc319be0-af47-4053-bdd2-8a4d53ec4679@damsy.net> (raw)
In-Reply-To: <6426b779-bd4d-4c85-b99d-4ddedf75d837@amd.com>

Thanks for the updated patch, looks good to me.

Le 09/10/2024 à 14:31, Christian König a écrit :
> Am 09.10.24 um 14:28 schrieb Mohammed Anees:
>> Before this patch, if multiple BO_HANDLES chunks were submitted,
>> the error -EINVAL would be correctly set but could be overwritten
>> by the return value from amdgpu_cs_p1_bo_handles(). This patch
>> ensures that if there are multiple BO_HANDLES, we stop.
>>
>> Cc: stable@vger.kernel.org
>> Fixes: fec5f8e8c6bc ("drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit")
>> Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com>
> 
> Reviewed-by: Christian König <christian.koenig@amd.com>
> 
> @Pierre-Eric can you pick that one up and push to amd-staging-drm-next?
> 
> Alex is currently on XDC and I'm a bit busy as well.

Sure, will do.

Pierre-Eric

> 
> Thanks,
> Christian.
> 
>> ---
>> v2:
>> - Switched to goto free_partial_kdata for error handling, following the existing pattern.
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> index 1e475eb01417..d891ab779ca7 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>> @@ -265,7 +265,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p,
>>               /* Only a single BO list is allowed to simplify handling. */
>>               if (p->bo_list)
>> -                ret = -EINVAL;
>> +                goto free_partial_kdata;
>>               ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata);
>>               if (ret)


      reply	other threads:[~2024-10-09 13:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09 12:28 [PATCH v2] drm/amdgpu: prevent BO_HANDLES error from being overwritten Mohammed Anees
2024-10-09 12:31 ` Christian König
2024-10-09 13:52   ` Pierre-Eric Pelloux-Prayer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc319be0-af47-4053-bdd2-8a4d53ec4679@damsy.net \
    --to=pierre-eric@damsy.net \
    --cc=David.Wu3@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=YuanShang.Mao@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=pvmohammedanees2003@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=srinivasan.shanmugam@amd.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox