]> git.baikalelectronics.ru Git - kernel.git/commit
x86: use proper parentheses around new uaccess macro argument uses
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 17:39:33 +0000 (10:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 Jun 2020 17:39:33 +0000 (10:39 -0700)
commit1cd9aecadb606a23a70d50f87326d16d86f701e4
treeb30d0b0b916a7e7b539086101782ac4b994b6385
parent3b29a57b55267b8d70915bf5a43f95d64687b0a9
x86: use proper parentheses around new uaccess macro argument uses

__get_kernel_nofault() didn't have the parentheses around the use of
'src' and 'dst' macro arguments, making the casts potentially do the
wrong thing.

The parentheses aren't necessary with the current very limited use in
mm/access.c, but it's bad form, and future use-cases might have very
unexpected errors as a result.

Do the same for unsafe_copy_loop() while at it, although in that case it
is an entirely internal x86 uaccess helper macro that isn't used
anywhere else and any other use would be invalid anyway.

Fixes: b77610c74b27 ("x86: use non-set_fs based maccess routines")
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/include/asm/uaccess.h