linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: kbuild-all@01.org, linux-fsdevel@vger.kernel.org,
	David Howells <dhowells@redhat.com>
Subject: [vfs:work.mount-syscalls 1/10] fs/namespace.c:2386:35: sparse: sparse: incorrect type in argument 2 (different address spaces)
Date: Fri, 3 May 2019 19:35:55 +0800	[thread overview]
Message-ID: <201905031942.C09dfO2c%lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.mount-syscalls
head:   f1b5618e013af28b3c78daf424436a79674423c0
commit: a07b20004793d8926f78d63eb5980559f7813404 [1/10] vfs: syscall: Add open_tree(2) to reference or clone a mount
reproduce:
        # apt-get install sparse
        git checkout a07b20004793d8926f78d63eb5980559f7813404
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)

   fs/namespace.c:1736:22: sparse: sparse: symbol 'to_mnt_ns' was not declared. Should it be static?
>> fs/namespace.c:2386:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *name @@    got f] <asn:1> *name @@
>> fs/namespace.c:2386:35: sparse:    expected char const [noderef] <asn:1> *name
>> fs/namespace.c:2386:35: sparse:    got char const *filename

vim +2386 fs/namespace.c

  2352	
  2353	SYSCALL_DEFINE3(open_tree, int, dfd, const char *, filename, unsigned, flags)
  2354	{
  2355		struct file *file;
  2356		struct path path;
  2357		int lookup_flags = LOOKUP_AUTOMOUNT | LOOKUP_FOLLOW;
  2358		bool detached = flags & OPEN_TREE_CLONE;
  2359		int error;
  2360		int fd;
  2361	
  2362		BUILD_BUG_ON(OPEN_TREE_CLOEXEC != O_CLOEXEC);
  2363	
  2364		if (flags & ~(AT_EMPTY_PATH | AT_NO_AUTOMOUNT | AT_RECURSIVE |
  2365			      AT_SYMLINK_NOFOLLOW | OPEN_TREE_CLONE |
  2366			      OPEN_TREE_CLOEXEC))
  2367			return -EINVAL;
  2368	
  2369		if ((flags & (AT_RECURSIVE | OPEN_TREE_CLONE)) == AT_RECURSIVE)
  2370			return -EINVAL;
  2371	
  2372		if (flags & AT_NO_AUTOMOUNT)
  2373			lookup_flags &= ~LOOKUP_AUTOMOUNT;
  2374		if (flags & AT_SYMLINK_NOFOLLOW)
  2375			lookup_flags &= ~LOOKUP_FOLLOW;
  2376		if (flags & AT_EMPTY_PATH)
  2377			lookup_flags |= LOOKUP_EMPTY;
  2378	
  2379		if (detached && !may_mount())
  2380			return -EPERM;
  2381	
  2382		fd = get_unused_fd_flags(flags & O_CLOEXEC);
  2383		if (fd < 0)
  2384			return fd;
  2385	
> 2386		error = user_path_at(dfd, filename, lookup_flags, &path);
  2387		if (unlikely(error)) {
  2388			file = ERR_PTR(error);
  2389		} else {
  2390			if (detached)
  2391				file = open_detached_copy(&path, flags & AT_RECURSIVE);
  2392			else
  2393				file = dentry_open(&path, O_PATH, current_cred());
  2394			path_put(&path);
  2395		}
  2396		if (IS_ERR(file)) {
  2397			put_unused_fd(fd);
  2398			return PTR_ERR(file);
  2399		}
  2400		fd_install(fd, file);
  2401		return fd;
  2402	}
  2403	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

                 reply	other threads:[~2019-05-03 11:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=201905031942.C09dfO2c%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dhowells@redhat.com \
    --cc=kbuild-all@01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).