drm/i915: Use acquire when checking software fence completion
Subsystems (2)
PATCH 1/1 drm/i915: Use acquire when checking software fence completion
__i915_sw_fence_wake_up_all() publishes completion with atomic_set_release(). Pair it with atomic_read_acquire() in i915_sw_fence_done().
Without acquire ordering, a waiter can observe the completed state while still reading stale data written before completion, such as fence->error. This can prevent errors from completed dependencies from being propagated.
i915_sw_fence_signaled() also accepts the state before the completion callback finishes, and its callers do not consume completion data. It does not need acquire ordering.
---
Found by auditing atomic operations used for synchronization. A similar fix can be found in 6df8e84aa6b5.
--- drivers/gpu/drm/i915/i915_sw_fence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_sw_fence.h +1 -1
@@ -105,7 +105,7 @@ static inline bool i915_sw_fence_signaled(const struct i915_sw_fence *fence)static inline bool i915_sw_fence_done (const struct i915_sw_fence *fence) { -return atomic_read (&fence->pending) <0 ; +return atomic_read_acquire (&fence->pending) <0 ; }static inline void i915_sw_fence_wait (struct i915_sw_fence *fence)
Signature · 1 line
2.34.1
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm/i915: Use acquire when checking software fence completion
== Series Details ==
== Series Details ==
Series: drm/i915: Use acquire when checking software fence completion
URL : https://patchwork.freedesktop.org/series/171112/
State : failure
== Summary ==
Series author address '[email protected]' is not on the allowlist, which prevents CI from being automatically triggered. If you want CI to run for this series, ask Patchwork project owners to click 'retest' on the series in Patchwork. Exception occurred during validation, bailing out!
Build URL: http://gfx-ci.igk.intel.com:8080/job/CI_PW_kernel/182584/ (on built-in)