[Intel-gfx] [PATCH] drm/i915: fix typo causing bad memory access in ring init
Dave Airlie
airlied at gmail.com
Thu Aug 13 19:13:04 PDT 2015
From: Dave Airlie <airlied at redhat.com>
This is validating from the wrong index.
testing with KASAN found it.
Reported-by: Dave Jones <davej at codemonkey.org.uk>
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index 61ae8ff..59f85e2 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -534,7 +534,7 @@ static bool validate_cmds_sorted(struct intel_engine_cs *ring,
for (j = 0; j < table->count; j++) {
const struct drm_i915_cmd_descriptor *desc =
- &table->table[i];
+ &table->table[j];
u32 curr = desc->cmd.value & desc->cmd.mask;
if (curr < previous) {
--
2.4.3
More information about the Intel-gfx
mailing list