Skip to content

Commit 39517fb

Browse files
mairacanalsmb49
authored andcommitted
drm/v3d: Ensure job pointer is set to NULL after job completion
BugLink: https://bugs.launchpad.net/bugs/2107449 [ Upstream commit e4b5ccd ] After a job completes, the corresponding pointer in the device must be set to NULL. Failing to do so triggers a warning when unloading the driver, as it appears the job is still active. To prevent this, assign the job pointer to NULL after completing the job, indicating the job has finished. Fixes: 14d1d19 ("drm/v3d: Remove the bad signaled() implementation.") Signed-off-by: Maíra Canal <mcanal@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250113154741.67520-1-mcanal@igalia.com Signed-off-by: Sasha Levin <sashal@kernel.org> CVE-2025-21697 Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent d0d5e79 commit 39517fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/v3d/v3d_irq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ v3d_irq(int irq, void *arg)
118118

119119
trace_v3d_bcl_irq(&v3d->drm, fence->seqno);
120120
dma_fence_signal(&fence->base);
121+
v3d->bin_job = NULL;
121122
status = IRQ_HANDLED;
122123
}
123124

@@ -138,6 +139,7 @@ v3d_irq(int irq, void *arg)
138139

139140
trace_v3d_rcl_irq(&v3d->drm, fence->seqno);
140141
dma_fence_signal(&fence->base);
142+
v3d->render_job = NULL;
141143
status = IRQ_HANDLED;
142144
}
143145

@@ -158,6 +160,7 @@ v3d_irq(int irq, void *arg)
158160

159161
trace_v3d_csd_irq(&v3d->drm, fence->seqno);
160162
dma_fence_signal(&fence->base);
163+
v3d->csd_job = NULL;
161164
status = IRQ_HANDLED;
162165
}
163166

@@ -205,6 +208,7 @@ v3d_hub_irq(int irq, void *arg)
205208

206209
trace_v3d_tfu_irq(&v3d->drm, fence->seqno);
207210
dma_fence_signal(&fence->base);
211+
v3d->tfu_job = NULL;
208212
status = IRQ_HANDLED;
209213
}
210214

0 commit comments

Comments
 (0)