Skip to content

Commit 9669a50

Browse files
committed
drm/i915: Drop rq->ring->vma peeking from error capture
We only hold the active spinlock while dumping the error state, and this does not prevent another thread from retiring the request -- as it is quite possible that despite us capturing the current state, the GPU has completed the request. As such, it is dangerous to dereference state below the request as it may already be freed, and the simplest way to avoid the danger is not include it in the error state. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1788 Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Andi Shyti <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9c87855 commit 9669a50

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

drivers/gpu/drm/i915/i915_gpu_error.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,14 +467,14 @@ static void error_print_request(struct drm_i915_error_state_buf *m,
467467
if (!erq->seqno)
468468
return;
469469

470-
err_printf(m, "%s pid %d, seqno %8x:%08x%s%s, prio %d, start %08x, head %08x, tail %08x\n",
470+
err_printf(m, "%s pid %d, seqno %8x:%08x%s%s, prio %d, head %08x, tail %08x\n",
471471
prefix, erq->pid, erq->context, erq->seqno,
472472
test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
473473
&erq->flags) ? "!" : "",
474474
test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
475475
&erq->flags) ? "+" : "",
476476
erq->sched_attr.priority,
477-
erq->start, erq->head, erq->tail);
477+
erq->head, erq->tail);
478478
}
479479

480480
static void error_print_context(struct drm_i915_error_state_buf *m,
@@ -1213,7 +1213,6 @@ static void record_request(const struct i915_request *request,
12131213
erq->context = request->fence.context;
12141214
erq->seqno = request->fence.seqno;
12151215
erq->sched_attr = request->sched.attr;
1216-
erq->start = i915_ggtt_offset(request->ring->vma);
12171216
erq->head = request->head;
12181217
erq->tail = request->tail;
12191218

drivers/gpu/drm/i915/i915_gpu_error.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ struct i915_request_coredump {
5050
pid_t pid;
5151
u32 context;
5252
u32 seqno;
53-
u32 start;
5453
u32 head;
5554
u32 tail;
5655
struct i915_sched_attr sched_attr;

0 commit comments

Comments
 (0)