drivers/gpu/drm/i915/i915_gem_execbuffer.o: warning: objtool: 
.altinstr_replacement+0x3c: redundant UACCESS disable
drivers/gpu/drm/i915/i915_gem_execbuffer.o: warning: objtool: 
.altinstr_replacement+0x66: redundant UACCESS disable

AKA. you don't need user_access_end() if user_access_begin() fails.

Cc: Chris Wilson <ch...@chris-wilson.co.uk>
Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1605,7 +1605,6 @@ static int eb_copy_relocations(const str
                                             (char __user *)urelocs + copied,
                                             len)) {
 end_user:
-                               user_access_end();
                                kvfree(relocs);
                                err = -EFAULT;
                                goto err;
@@ -2628,8 +2627,8 @@ i915_gem_execbuffer2_ioctl(struct drm_de
                                        &user_exec_list[i].offset,
                                        end_user);
                }
-end_user:
                user_access_end();
+end_user:;
        }
 
        args->flags &= ~__I915_EXEC_UNKNOWN_FLAGS;


Reply via email to