powerpc/uaccess: Cast away __user annotation after verification
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 11 Oct 2023 05:37:08 +0000 (16:37 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 19 Oct 2023 06:16:20 +0000 (17:16 +1100)
commitc6519c6df0722e432f330afbc7c00d16d5be5c58
tree9c511bef1cde73d8e65d783705edc991160dab80
parent8577dd00a6ba335bc359313599d6100522a1931c
powerpc/uaccess: Cast away __user annotation after verification

Sparse reports dereference of a __user pointer. copy_mc_to_user() takes
a __user pointer, verifies it, then calls the generic copy routine
copy_mc_generic().

As we have verified the pointer, cast out the __user annotation when
passing to copy_mc_generic().

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231011053711.93427-10-bgray@linux.ibm.com
arch/powerpc/include/asm/uaccess.h