fs/namei.c:232:6: error: unexpected token, expected comma
From: kernel test robot
Date: Tue Apr 08 2025 - 19:24:59 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bec7dcbc242c6c087cede1a6fdfaeb5d6eaf25bf
commit: e896474fe4851ffc4dd860c92daa906783090346 getname_maybe_null() - the third variant of pathname copy-in
date: 6 months ago
config: mips-randconfig-r064-20250408 (https://download.01.org/0day-ci/archive/20250409/202504090937.ZGGFamL2-lkp@xxxxxxxxx/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250409/202504090937.ZGGFamL2-lkp@xxxxxxxxx/reproduce)
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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504090937.ZGGFamL2-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from fs/namei.c:25:
In file included from include/linux/pagemap.h:8:
In file included from include/linux/mm.h:2213:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> fs/namei.c:232:6: error: unexpected token, expected comma
232 | if (get_user(c, pathname))
| ^
arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
97 | access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) : \
| ^
arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
177 | __get_data_asm((x), user_lb, __gu_ptr); \
| ^
<inline asm>:3:10: note: instantiated into assembly here
3 | .set eva
| ^
fs/namei.c:232:6: error: instruction requires a CPU feature not currently enabled
232 | if (get_user(c, pathname))
| ^
arch/mips/include/asm/uaccess.h:97:33: note: expanded from macro 'get_user'
97 | access_ok(__p, sizeof(*__p)) ? __get_user((x), __p) : \
| ^
arch/mips/include/asm/uaccess.h:177:23: note: expanded from macro '__get_user'
177 | __get_data_asm((x), user_lb, __gu_ptr); \
| ^
<inline asm>:4:2: note: instantiated into assembly here
4 | lbe $3, 0($4)
| ^
1 warning and 2 errors generated.
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for GET_FREE_REGION
Depends on [n]: SPARSEMEM [=n]
Selected by [m]:
- RESOURCE_KUNIT_TEST [=m] && RUNTIME_TESTING_MENU [=y] && KUNIT [=m]
vim +232 fs/namei.c
225
226 struct filename *__getname_maybe_null(const char __user *pathname)
227 {
228 struct filename *name;
229 char c;
230
231 /* try to save on allocations; loss on um, though */
> 232 if (get_user(c, pathname))
233 return ERR_PTR(-EFAULT);
234 if (!c)
235 return NULL;
236
237 name = getname_flags(pathname, LOOKUP_EMPTY);
238 if (!IS_ERR(name) && !(name->name[0])) {
239 putname(name);
240 name = NULL;
241 }
242 return name;
243 }
244
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki