From: Li Huafei <lihuafei1@huawei.com>
To: Lyude Paul <lyude@redhat.com>, <kherbst@redhat.com>
Cc: <dakr@redhat.com>, <airlied@gmail.com>, <simona@ffwll.ch>,
<colin.i.king@gmail.com>, <rdunlap@infradead.org>,
<bskeggs@redhat.com>, <dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau/gr/gf100: Fix missing unlock in gf100_gr_chan_new()
Date: Thu, 31 Oct 2024 10:04:07 +0800 [thread overview]
Message-ID: <67c66881-231f-1a35-caab-0a6327365e58@huawei.com> (raw)
In-Reply-To: <10f8d1c07a3bf49d643a06ae0b6c11bd4c9dd880.camel@redhat.com>
On 2024/10/30 2:42, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> Will push upstream in a moment
>
Thank you for reviewing.
Thanks,
Huafei
> On Sun, 2024-10-27 at 01:38 +0800, Li Huafei wrote:
>> When the call to gf100_grctx_generate() fails, unlock gr->fecs.mutex
>> before returning the error.
>>
>> Fixes smatch warning:
>>
>> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:480 gf100_gr_chan_new() warn: inconsistent returns '&gr->fecs.mutex'.
>>
>> Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc")
>> Signed-off-by: Li Huafei <lihuafei1@huawei.com>
>> ---
>> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
>> index 060c74a80eb1..3ea447f6a45b 100644
>> --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
>> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
>> @@ -443,6 +443,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
>> ret = gf100_grctx_generate(gr, chan, fifoch->inst);
>> if (ret) {
>> nvkm_error(&base->engine.subdev, "failed to construct context\n");
>> + mutex_unlock(&gr->fecs.mutex);
>> return ret;
>> }
>> }
>
prev parent reply other threads:[~2024-10-31 2:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-26 17:38 Li Huafei
2024-10-29 18:42 ` Lyude Paul
2024-10-31 2:04 ` Li Huafei [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=67c66881-231f-1a35-caab-0a6327365e58@huawei.com \
--to=lihuafei1@huawei.com \
--cc=airlied@gmail.com \
--cc=bskeggs@redhat.com \
--cc=colin.i.king@gmail.com \
--cc=dakr@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rdunlap@infradead.org \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®