All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 1/4] exportfs: add flag to indicate local file handles
Date: Mon, 2 Dec 2024 00:01:39 +0800	[thread overview]
Message-ID: <202412012337.HpTm35G5-lkp@intel.com> (raw)
In-Reply-To: <20241201-work-exportfs-v1-1-b850dda4502a@kernel.org>

Hi Christian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 74e20c5946ab3f8ad959ea34f63f21e157d3ebae]

url:    https://github.com/intel-lab-lkp/linux/commits/Christian-Brauner/exportfs-add-flag-to-indicate-local-file-handles/20241201-211528
base:   74e20c5946ab3f8ad959ea34f63f21e157d3ebae
patch link:    https://lore.kernel.org/r/20241201-work-exportfs-v1-1-b850dda4502a%40kernel.org
patch subject: [PATCH 1/4] exportfs: add flag to indicate local file handles
config: arm-footbridge_defconfig (https://download.01.org/0day-ci/archive/20241201/202412012337.HpTm35G5-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 592c0fe55f6d9a811028b5f3507be91458ab2713)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241201/202412012337.HpTm35G5-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412012337.HpTm35G5-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from fs/nfsd/export.c:19:
   In file included from include/linux/sunrpc/svc_xprt.h:11:
   In file included from include/linux/sunrpc/svc.h:17:
   In file included from include/linux/sunrpc/xdr.h:17:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2223:
   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/nfsd/export.c:458:6: warning: variable 'nop' is uninitialized when used here [-Wuninitialized]
     458 |         if (nop && nop->flags & EXPORT_OP_LOCAL_FILE_HANDLE) {
         |             ^~~
   fs/nfsd/export.c:420:37: note: initialize the variable 'nop' to silence this warning
     420 |         const struct export_operations *nop;
         |                                            ^
         |                                             = NULL
   fs/nfsd/export.c:1045:17: warning: variable 'inode' set but not used [-Wunused-but-set-variable]
    1045 |         struct inode            *inode;
         |                                  ^
   3 warnings generated.


vim +/nop +458 fs/nfsd/export.c

   416	
   417	static int check_export(struct path *path, int *flags, unsigned char *uuid)
   418	{
   419		struct inode *inode = d_inode(path->dentry);
   420		const struct export_operations *nop;
   421	
   422		/*
   423		 * We currently export only dirs, regular files, and (for v4
   424		 * pseudoroot) symlinks.
   425		 */
   426		if (!S_ISDIR(inode->i_mode) &&
   427		    !S_ISLNK(inode->i_mode) &&
   428		    !S_ISREG(inode->i_mode))
   429			return -ENOTDIR;
   430	
   431		/*
   432		 * Mountd should never pass down a writeable V4ROOT export, but,
   433		 * just to make sure:
   434		 */
   435		if (*flags & NFSEXP_V4ROOT)
   436			*flags |= NFSEXP_READONLY;
   437	
   438		/* There are two requirements on a filesystem to be exportable.
   439		 * 1:  We must be able to identify the filesystem from a number.
   440		 *       either a device number (so FS_REQUIRES_DEV needed)
   441		 *       or an FSID number (so NFSEXP_FSID or ->uuid is needed).
   442		 * 2:  We must be able to find an inode from a filehandle.
   443		 *       This means that s_export_op must be set.
   444		 * 3: We must not currently be on an idmapped mount.
   445		 */
   446		if (!(inode->i_sb->s_type->fs_flags & FS_REQUIRES_DEV) &&
   447		    !(*flags & NFSEXP_FSID) &&
   448		    uuid == NULL) {
   449			dprintk("exp_export: export of non-dev fs without fsid\n");
   450			return -EINVAL;
   451		}
   452	
   453		if (!exportfs_can_decode_fh(nop)) {
   454			dprintk("exp_export: export of invalid fs type.\n");
   455			return -EINVAL;
   456		}
   457	
 > 458		if (nop && nop->flags & EXPORT_OP_LOCAL_FILE_HANDLE) {
   459			dprintk("exp_export: filesystem only supports non-exportable file handles.\n");
   460			return -EINVAL;
   461		}
   462	
   463		if (is_idmapped_mnt(path->mnt)) {
   464			dprintk("exp_export: export of idmapped mounts not yet supported.\n");
   465			return -EINVAL;
   466		}
   467	
   468		if (inode->i_sb->s_export_op->flags & EXPORT_OP_NOSUBTREECHK &&
   469		    !(*flags & NFSEXP_NOSUBTREECHECK)) {
   470			dprintk("%s: %s does not support subtree checking!\n",
   471				__func__, inode->i_sb->s_type->name);
   472			return -EINVAL;
   473		}
   474		return 0;
   475	}
   476	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-12-01 16:01 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-01 13:12 [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting file handles Christian Brauner
2024-12-01 13:12 ` [PATCH 1/4] exportfs: add flag to indicate local " Christian Brauner
2024-12-01 13:44   ` Amir Goldstein
2024-12-01 16:01   ` kernel test robot [this message]
2024-12-01 23:12   ` Dave Chinner
2024-12-02  9:19     ` Christian Brauner
2024-12-01 13:12 ` [PATCH 2/4] kernfs: restrict to " Christian Brauner
2024-12-01 13:12 ` [PATCH 3/4] ovl: restrict to exportable " Christian Brauner
2024-12-01 13:12 ` [PATCH 4/4] pidfs: restrict to local " Christian Brauner
2024-12-01 13:28 ` [PATCH 0/4] exportfs: add flag to allow marking export operations as only supporting " Jeff Layton
2024-12-01 16:22   ` Chuck Lever III
2024-12-03  9:08     ` Christian Brauner
2024-12-03 14:32       ` Jeff Layton
2024-12-01 13:44 ` Amir Goldstein
2024-12-05  0:38 ` Christoph Hellwig
2024-12-05 10:53   ` Christian Brauner
2024-12-05 11:57   ` Amir Goldstein
2024-12-06 16:03     ` Darrick J. Wong
2024-12-07  8:49       ` Amir Goldstein
2024-12-09  7:49         ` Christoph Hellwig
2024-12-09  8:58           ` Amir Goldstein
2024-12-09  9:16             ` Greg KH
2024-12-09 10:02               ` Amir Goldstein
2024-12-09 13:45               ` Christoph Hellwig
2024-12-09 13:46             ` Christoph Hellwig
2024-12-09 16:30               ` Amir Goldstein
2024-12-09 16:35                 ` Chuck Lever
2024-12-09 17:15                   ` Jeff Layton
2024-12-09 17:20                     ` Chuck Lever
2024-12-10 10:13                       ` Christian Brauner
2024-12-10 10:34                         ` Christian Brauner
2024-12-10 11:10                         ` Christoph Hellwig
2024-12-10 12:44                         ` Jeff Layton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202412012337.HpTm35G5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=brauner@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.