tree:
git://linux-nfs.org/~cel/cel-2.6.git nfsd-more-tracepoints
head: e0f9a869d6aa51ecf380be437d5cb68b31ad48ac
commit: 6393b2237f53af6f1d9ba87abb4d222d37653866 [30/34] NFSD: Add a lookup tracepoint
config: x86_64-randconfig-s022-20200921 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
git checkout 6393b2237f53af6f1d9ba87abb4d222d37653866
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> fs/nfsd/vfs.c:109:20: sparse: sparse: restricted __be32 degrades
to integer
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
> fs/nfsd/vfs.c:110:17: sparse: sparse: cast to restricted __be32
git remote add cel-cel-2.6
git://linux-nfs.org/~cel/cel-2.6.git
git fetch --no-tags cel-cel-2.6 nfsd-more-tracepoints
git checkout 6393b2237f53af6f1d9ba87abb4d222d37653866
vim +109 fs/nfsd/vfs.c
51
52 /*
53 * Called from nfsd_lookup and encode_dirent. Check if we have crossed
54 * a mount point.
55 * Returns -EAGAIN or -ETIMEDOUT leaving *dpp and *expp unchanged,
56 * or nfs_ok having possibly changed *dpp and *expp
57 */
58 int
59 nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
60 struct svc_export **expp)
61 {
62 struct svc_export *exp = *expp, *exp2 = NULL;
63 struct dentry *dentry = *dpp;
64 struct path path = {.mnt = mntget(exp->ex_path.mnt),
65 .dentry = dget(dentry)};
66 int err = 0;
67
68 err = follow_down(&path);
69 if (err < 0)
70 goto out;
71 if (path.mnt == exp->ex_path.mnt && path.dentry == dentry &&
72 nfsd_mountpoint(dentry, exp) == 2) {
73 /* This is only a mountpoint in some other namespace */
74 path_put(&path);
75 goto out;
76 }
77
78 exp2 = rqst_exp_get_by_name(rqstp, &path);
79 if (IS_ERR(exp2)) {
80 err = PTR_ERR(exp2);
81 /*
82 * We normally allow NFS clients to continue
83 * "underneath" a mountpoint that is not exported.
84 * The exception is V4ROOT, where no traversal is ever
85 * allowed without an explicit export of the new
86 * directory.
87 */
88 if (err == -ENOENT && !(exp->ex_flags & NFSEXP_V4ROOT))
89 err = 0;
90 path_put(&path);
91 goto out;
92 }
93 if (nfsd_v4client(rqstp) ||
94 (exp->ex_flags & NFSEXP_CROSSMOUNT) || EX_NOHIDE(exp2)) {
95 /* successfully crossed mount point */
96 /*
97 * This is subtle: path.dentry is *not* on path.mnt
98 * at this point. The only reason we are safe is that
99 * original mnt is pinned down by exp, so we should
100 * put path *before* putting exp
101 */
102 *dpp = path.dentry;
103 path.dentry = dentry;
104 *expp = exp2;
105 exp2 = exp;
106 }
107 path_put(&path);
108 exp_put(exp2);
109 if (err != nfs_ok)
110 trace_printk("xid=0x%08x status=%d",
111 be32_to_cpu(rqstp->rq_xid), be32_to_cpu(err));
112 out:
113 return err;
114 }
115
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org