drm: i915: fix sizeof argument in reset_csb_pointers
Subsystems (3)
PATCH 1/1 drm: i915: fix sizeof argument in reset_csb_pointers
In reset_csb_pointers(), drm_clflush_virt_range() is called with a size calculated using sizeof(execlists->csb_status), which returns the size of the pointer rather than the size of the object it points to. This could lead to incomplete cache flushing on 32-bit systems where pointer size differs from u64.
Replace sizeof(execlists->csb_status) withsizeof(*execlists->csb_status).
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +1 -1
@@ -2833,7 +2833,7 @@ static void reset_csb_pointers(struct intel_engine_cs *engine)memset (execlists->csb_status,-1 , (reset_value +1 ) *sizeof (u64));drm_clflush_virt_range (execlists->csb_status, execlists->csb_size * -sizeof (execlists->csb_status)); +sizeof (*execlists->csb_status));/* Once more for luck and our trusty paranoia */ ENGINE_WRITE(engine, RING_CONTEXT_STATUS_PTR,
Signature · 1 line
2.53.0
Patchwork
CI✗ LGCI.VerificationFailed: failure for drm: i915: fix sizeof argument in reset_csb_pointers
== Series Details ==
== Series Details ==
Series: drm: i915: fix sizeof argument in reset_csb_pointers
URL : https://patchwork.freedesktop.org/series/172097/
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/184099/ (on built-in)