[openeuler:openEuler-1.0-LTS 1418/1418] mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read'

tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: cc7cb040bd0afe96f1da94c9f21eda5a986510a5 commit: 5c5bac1227aee80ee106ec07b32c981558049304 [1418/1418] uaccess: Add non-pagefault user-space read functions config: x86_64-buildonly-randconfig-001-20250207 (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250209/202502090137.3KkiIJ8x-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202502090137.3KkiIJ8x-lkp@intel.com/ All warnings (new ones prefixed by >>):
mm/maccess.c:64:6: warning: no previous prototype for '__probe_user_read' [-Wmissing-prototypes] 64 | long __probe_user_read(void *dst, const void __user *src, size_t size) | ^~~~~~~~~~~~~~~~~
vim +/__probe_user_read +64 mm/maccess.c 50 51 /** 52 * probe_user_read(): safely attempt to read from a user-space location 53 * @dst: pointer to the buffer that shall take the data 54 * @src: address to read from. This must be a user address. 55 * @size: size of the data chunk 56 * 57 * Safely read from user address @src to the buffer at @dst. If a kernel fault 58 * happens, handle that and return -EFAULT. 59 */ 60 61 long __weak probe_user_read(void *dst, const void __user *src, size_t size) 62 __attribute__((alias("__probe_user_read"))); 63
64 long __probe_user_read(void *dst, const void __user *src, size_t size) 65 { 66 long ret = -EFAULT; 67 mm_segment_t old_fs = get_fs(); 68 69 set_fs(USER_DS); 70 if (access_ok(src, size)) 71 ret = probe_read_common(dst, src, size); 72 set_fs(old_fs); 73 74 return ret; 75 } 76 EXPORT_SYMBOL_GPL(probe_user_read); 77
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot