From 4587f1482eeb54fb0c7f2092da0440d3912c939c Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 11 Jun 2021 21:15:08 +0200 Subject: drm/i915/eb: Replace user_access_begin by user_write_access_begin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to commit b44f687386875b714dae2afa768e73401e45c21c Author: Christophe Leroy Date: Fri Apr 3 07:20:52 2020 +0000 drm/i915/gem: Replace user_access_begin by user_write_access_begin We only do unsafe_put_user, so no read access needed. Signed-off-by: Daniel Vetter Cc: Jon Bloomfield Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Joonas Lahtinen Cc: Daniel Vetter Cc: "Thomas Hellström" Cc: Matthew Auld Cc: Lionel Landwerlin Cc: Dave Airlie Cc: Jason Ekstrand Cc: Christophe Leroy Cc: Kees Cook Cc: Michael Ellerman --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index bc6b5eec3f31..3753b9661f32 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -1709,14 +1709,14 @@ static int eb_copy_relocations(const struct i915_execbuffer *eb) * happened we would make the mistake of assuming that the * relocations were valid. */ - if (!user_access_begin(urelocs, size)) + if (!user_write_access_begin(urelocs, size)) goto end; for (copied = 0; copied < nreloc; copied++) unsafe_put_user(-1, &urelocs[copied].presumed_offset, end_user); - user_access_end(); + user_write_access_end(); eb->exec[i].relocs_ptr = (uintptr_t)relocs; } -- cgit v1.2.3