[cel:nfsd-testing 214/240] fs/nfsd/vfs.c:286:52: sparse: sparse: incorrect type in initializer (different base types)
kernel test robot <[email protected]> Thu, 23 Jul 2026 11:38:47 +0800
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
tree: https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux nfsd-testing head: e2407463212ffde400eb33dbee5098af3f02f346 commit: f0212435e29b1624ee539b04611cd4658497a5be [214/240] nfsd: move check_nfsd_access() call into nfsd_cross_mnt() config: i386-randconfig-r112-20260722 (https://download.01.org/0day-ci/archive/20260723/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260723/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ sparse warnings: (new ones prefixed by >>) >> fs/nfsd/vfs.c:286:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected int nfserr @@ got restricted __be32 @@ fs/nfsd/vfs.c:286:52: sparse: expected int nfserr fs/nfsd/vfs.c:286:52: sparse: got restricted __be32 >> fs/nfsd/vfs.c:291:40: sparse: sparse: incorrect type in return expression (different base types) @@ expected restricted __be32 @@ got int nfserr @@ fs/nfsd/vfs.c:291:40: sparse: expected restricted __be32 fs/nfsd/vfs.c:291:40: sparse: got int nfserr fs/nfsd/vfs.c:2435:27: sparse: sparse: undefined identifier '__builtin_infer_alloc_token' fs/nfsd/vfs.c:2435:27: sparse: sparse: undefined identifier '__builtin_infer_alloc_token' fs/nfsd/vfs.c:2435:27: sparse: sparse: undefined identifier '__builtin_infer_alloc_token' vim +286 fs/nfsd/vfs.c 249 250 __be32 251 nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp, 252 const char *name, unsigned int len, 253 struct svc_export **exp_ret, struct dentry **dentry_ret) 254 { 255 struct svc_export *exp; 256 struct dentry *dparent; 257 struct dentry *dentry; 258 int host_err; 259 260 trace_nfsd_vfs_lookup(rqstp, fhp, name, len); 261 262 dparent = fhp->fh_dentry; 263 exp = exp_get(fhp->fh_export); 264 265 /* Lookup the name, but don't follow links */ 266 if (name_is_dot_dotdot(name, len)) { 267 if (len==1) 268 dentry = dget(dparent); 269 else if (dparent != exp->ex_path.dentry) 270 dentry = dget_parent(dparent); 271 else if (!EX_NOHIDE(exp) && !nfsd_v4client(rqstp)) 272 dentry = dget(dparent); /* .. == . just like at / */ 273 else { 274 /* checking mountpoint crossing is very different when stepping up */ 275 host_err = nfsd_lookup_parent(rqstp, dparent, &exp, &dentry); 276 if (host_err) 277 goto out_nfserr; 278 } 279 } else { 280 dentry = lookup_one_unlocked(&nop_mnt_idmap, 281 &QSTR_LEN(name, len), dparent); 282 host_err = PTR_ERR(dentry); 283 if (IS_ERR(dentry)) 284 goto out_nfserr; 285 if (nfsd_mountpoint(dentry, exp)) { > 286 int nfserr = nfsd_cross_mnt(rqstp, &dentry, &exp); 287 288 if (nfserr) { 289 dput(dentry); 290 exp_put(exp); > 291 return nfserr; 292 } 293 } 294 } 295 *dentry_ret = dentry; 296 *exp_ret = exp; 297 return 0; 298 299 out_nfserr: 300 exp_put(exp); 301 return nfserrno(host_err); 302 } 303 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki