]> git.baikalelectronics.ru Git - kernel.git/commit
xtensa: add missing __user annotations to __{get,put}_user_check
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 22 May 2020 17:54:32 +0000 (10:54 -0700)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 22 May 2020 21:32:13 +0000 (14:32 -0700)
commit9f8780f050d3d3cf9d997e158be9134822abe9c4
treeac38cd5af5bdc933ae4ca6cf349928d823d47fba
parent4bb5610f69410b69d078c15c5191e5ec9c502dd1
xtensa: add missing __user annotations to __{get,put}_user_check

__get_user_check and __put_user_check use temporary pointer but don't
mark it as __user, resulting in sparse warnings:

  sparse: warning: incorrect type in initializer (different address spaces)
  sparse:    expected long *__pu_addr
  sparse:    got long [noderef] <asn:1> *ret

  sparse: warning: incorrect type in argument 1 (different address spaces)
  sparse:    expected void [noderef] <asn:1> *to
  sparse:    got long *__pu_addr

Add __user annotation to temporary pointer in __get_user_check and
__put_user_check.

Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/include/asm/uaccess.h