Skip to content

Commit 721017c

Browse files
icklerodrigovivi
authored andcommitted
drm/i915/gem: Ignore readonly failures when updating relocs
If the user passes in a readonly reloc[], by the time we notice we have already committed to modifying the execobjects, or have indeed done so already. Reporting the failure just compounds the issue as we have no second pass to fall back to anymore. "Be damned if you do, and damned if you don't." Testcase: igt/gem_exec_reloc/readonly Fixes: 7dc8f11 ("drm/i915/gem: Drop relocation slowpath") References: fddcd00 ("drm/i915: Force the slow path after a user-write error") Signed-off-by: Chris Wilson <[email protected]> Cc: Matthew Auld <[email protected]> Cc: Joonas Lahtinen <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 97a37c9) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 0b72a25 commit 721017c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,10 +1477,8 @@ static int eb_relocate_vma(struct i915_execbuffer *eb, struct eb_vma *ev)
14771477
* can read from this userspace address.
14781478
*/
14791479
offset = gen8_canonical_addr(offset & ~UPDATE);
1480-
if (unlikely(__put_user(offset, &urelocs[r-stack].presumed_offset))) {
1481-
remain = -EFAULT;
1482-
goto out;
1483-
}
1480+
__put_user(offset,
1481+
&urelocs[r - stack].presumed_offset);
14841482
}
14851483
} while (r++, --count);
14861484
urelocs += ARRAY_SIZE(stack);

0 commit comments

Comments
 (0)