[Intel-gfx] [PATCH] drm/i915: Be wary of data races when reading the active execlists
Chris Wilson
chris at chris-wilson.co.uk
Wed Jul 15 19:22:30 UTC 2020
Quoting Chris Wilson (2020-07-10 18:10:01)
> [ 1413.563200] BUG: KCSAN: data-race in __await_execution+0x217/0x370 [i915]
> [ 1413.563221]
> [ 1413.563236] race at unknown origin, with read to 0xffff88885bb6c478 of 8 bytes by task 9654 on cpu 1:
> [ 1413.563548] __await_execution+0x217/0x370 [i915]
> [ 1413.563891] i915_request_await_dma_fence+0x4eb/0x6a0 [i915]
> [ 1413.564235] i915_request_await_object+0x421/0x490 [i915]
> [ 1413.564577] i915_gem_do_execbuffer+0x29b7/0x3c40 [i915]
> [ 1413.564967] i915_gem_execbuffer2_ioctl+0x22f/0x5c0 [i915]
> [ 1413.564998] drm_ioctl_kernel+0x156/0x1b0
> [ 1413.565022] drm_ioctl+0x2ff/0x480
> [ 1413.565046] __x64_sys_ioctl+0x87/0xd0
> [ 1413.565069] do_syscall_64+0x4d/0x80
> [ 1413.565094] entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> To complicate matters, we have to both avoid the read tearing of *active
> and avoid any write tearing as perform the pending[] -> inflight[]
> promotion of the execlists.
>
> Fixes: b55230e5e800 ("drm/i915: Check for awaits on still currently executing requests")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
KCSAN reminds me this is still possible.
-Chris
More information about the Intel-gfx
mailing list