[openeuler:OLK-6.6 2357/2357] mm/clear_freelist_page.c:133:50: sparse: sparse: incorrect type in argument 3 (different address spaces)

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: a9e6ec001662a376522f36604dfec47c30530549 commit: beb43b9e2640c0662a78e1417b1861729cf6c729 [2357/2357] mm: Add sysctl to clear free list pages config: arm64-randconfig-r123-20250605 (https://download.01.org/0day-ci/archive/20250605/202506050455.Zu20ul1z-lkp@i...) compiler: aarch64-linux-gcc (GCC) 10.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250605/202506050455.Zu20ul1z-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/202506050455.Zu20ul1z-lkp@intel.com/ sparse warnings: (new ones prefixed by >>)
mm/clear_freelist_page.c:133:50: sparse: sparse: incorrect type in argument 3 (different address spaces) @@ expected void * @@ got void [noderef] __user *buffer @@ mm/clear_freelist_page.c:133:50: sparse: expected void * mm/clear_freelist_page.c:133:50: sparse: got void [noderef] __user *buffer mm/clear_freelist_page.c:147:36: sparse: sparse: incorrect type in initializer (incompatible argument 3 (different address spaces)) @@ expected int ( [usertype] *proc_handler )( ... ) @@ got int ( * )( ... ) @@ mm/clear_freelist_page.c:147:36: sparse: expected int ( [usertype] *proc_handler )( ... ) mm/clear_freelist_page.c:147:36: sparse: got int ( * )( ... )
vim +133 mm/clear_freelist_page.c 125 126 static int sysctl_clear_freelist_handler(struct ctl_table *table, int write, 127 void __user *buffer, size_t *lenp, loff_t *ppos) 128 { 129 int ret; 130 int val; 131 132 table->data = &val;
133 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); 134 135 if (!ret && write) 136 clear_freelist_pages(); 137 138 return ret; 139 } 140 141 static struct ctl_table clear_freelist_table[] = { 142 { 143 .procname = "clear_freelist_pages", 144 .data = NULL, 145 .maxlen = sizeof(int), 146 .mode = 0200, 147 .proc_handler = &sysctl_clear_freelist_handler, 148 .extra1 = SYSCTL_ONE, 149 .extra2 = SYSCTL_ONE, 150 } 151 }; 152
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot