drm/i915: Remove redundant user_access_end() from __copy_from_user() error path
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 25 Jul 2019 20:29:57 +0000 (15:29 -0500)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 9 Aug 2019 21:13:25 +0000 (23:13 +0200)
commite6a9522ac3ff59980ea00e070b6b8573aface36a
tree85815a2008c3817968ef0c0abca5eac9f4f72a55
parent33920f1ec5bf47c5c0a1d2113989bdd9dfb3fae9
drm/i915: Remove redundant user_access_end() from __copy_from_user() error path

Objtool reports:

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

__copy_from_user() already does both STAC and CLAC, so the
user_access_end() in its error path adds an extra unnecessary CLAC.

Fixes: 0b2c8f8b6b0c ("i915: fix missing user_access_end() in page fault exception case")
Reported-by: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://github.com/ClangBuiltLinux/linux/issues/617
Link: https://lkml.kernel.org/r/51a4155c5bc2ca847a9cbe85c1c11918bb193141.1564086017.git.jpoimboe@redhat.com
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c