* [PATCH] drm/nouveau/gr/gf100-: unlock mutex failing to create golden context
@ 2023-11-03 2:41 Danilo Krummrich
2023-11-03 3:28 ` Dave Airlie
0 siblings, 1 reply; 2+ messages in thread
From: Danilo Krummrich @ 2023-11-03 2:41 UTC (permalink / raw)
To: nouveau, faith
Cc: lyude, kherbst, airlied, dri-devel, linux-kernel,
Danilo Krummrich, stable
Do not return from gf100_gr_chan_new() with fecs mutex held when failing
to create the golden context image.
Cc: <stable@vger.kernel.org> # v6.2+
Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc")
Signed-off-by: Danilo Krummrich <dakr@redhat.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 c494a1ff2d57..f72d3aa33442 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
@@ -442,6 +442,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
if (gr->data == NULL) {
ret = gf100_grctx_generate(gr, chan, fifoch->inst);
if (ret) {
+ mutex_unlock(&gr->fecs.mutex);
nvkm_error(&base->engine.subdev, "failed to construct context\n");
return ret;
}
--
2.41.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/nouveau/gr/gf100-: unlock mutex failing to create golden context
2023-11-03 2:41 [PATCH] drm/nouveau/gr/gf100-: unlock mutex failing to create golden context Danilo Krummrich
@ 2023-11-03 3:28 ` Dave Airlie
0 siblings, 0 replies; 2+ messages in thread
From: Dave Airlie @ 2023-11-03 3:28 UTC (permalink / raw)
To: Danilo Krummrich
Cc: nouveau, faith, lyude, kherbst, dri-devel, linux-kernel, stable
On Fri, 3 Nov 2023 at 12:41, Danilo Krummrich <dakr@redhat.com> wrote:
>
> Do not return from gf100_gr_chan_new() with fecs mutex held when failing
> to create the golden context image.
Reviewed-by: Dave Airlie <airlied@redhat.com>
>
> Cc: <stable@vger.kernel.org> # v6.2+
> Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc")
> Signed-off-by: Danilo Krummrich <dakr@redhat.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 c494a1ff2d57..f72d3aa33442 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
> @@ -442,6 +442,7 @@ gf100_gr_chan_new(struct nvkm_gr *base, struct nvkm_chan *fifoch,
> if (gr->data == NULL) {
> ret = gf100_grctx_generate(gr, chan, fifoch->inst);
> if (ret) {
> + mutex_unlock(&gr->fecs.mutex);
> nvkm_error(&base->engine.subdev, "failed to construct context\n");
> return ret;
> }
> --
> 2.41.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-03 3:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-03 2:41 [PATCH] drm/nouveau/gr/gf100-: unlock mutex failing to create golden context Danilo Krummrich
2023-11-03 3:28 ` Dave Airlie
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®