mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Mateusz Guzik <mguzik@redhat.com>
Cc: kbuild-all@01.org, Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH] fs/file.c: tidy up close_files
Date: Fri, 9 Oct 2015 03:08:36 +0800	[thread overview]
Message-ID: <201510090309.gqPUUxHc%fengguang.wu@intel.com> (raw)
In-Reply-To: <1444327687-2923-1-git-send-email-mguzik@redhat.com>

Hi Mateusz,

[auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore]

reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   fs/file.c:321:17: sparse: incorrect type in assignment (different address spaces)
   fs/file.c:321:17:    expected struct file **old_fds
   fs/file.c:321:17:    got struct file [noderef] <asn:4>**fd
   fs/file.c:322:17: sparse: incorrect type in assignment (different address spaces)
   fs/file.c:322:17:    expected struct file **new_fds
   fs/file.c:322:17:    got struct file [noderef] <asn:4>**fd
>> fs/file.c:387:43: sparse: incorrect type in argument 1 (different address spaces)
   fs/file.c:387:43:    expected struct file *<noident>
   fs/file.c:387:43:    got struct file [noderef] <asn:4>*<noident>
   fs/file.c:446:28: sparse: incorrect type in initializer (different address spaces)
   fs/file.c:446:28:    expected struct fdtable [noderef] <asn:4>*fdt
   fs/file.c:446:28:    got struct fdtable [toplevel] *<noident>
   fs/file.c:606:14: sparse: incorrect type in assignment (different address spaces)
   fs/file.c:606:14:    expected struct file *file
   fs/file.c:606:14:    got struct file [noderef] <asn:4>*<noident>
   fs/file.c:641:30: sparse: incorrect type in assignment (different address spaces)
   fs/file.c:641:30:    expected struct file *file
   fs/file.c:641:30:    got struct file [noderef] <asn:4>*<noident>
   fs/file.c:802:16: sparse: incorrect type in assignment (different address spaces)
   fs/file.c:802:16:    expected struct file *tofree
   fs/file.c:802:16:    got struct file [noderef] <asn:4>*<noident>

vim +387 fs/file.c

   371		 * It is safe to dereference the fd table without RCU or
   372		 * ->file_lock because this is the last reference to the
   373		 * files structure.
   374		 */
   375		struct fdtable *fdt = rcu_dereference_raw(files->fdt);
   376		unsigned i;
   377	
   378		for (i = 0; ; i++) {
   379			unsigned long set;
   380			unsigned fd = i * BITS_PER_LONG;
   381			if (fd >= fdt->max_fds)
   382				break;
   383			set = fdt->open_fds[i];
   384			for ( ; set ; fd++, set >>= 1) {
   385				if (!(set & 1))
   386					continue;
 > 387				filp_close(fdt->fd[fd], files);
   388				cond_resched_rcu_qs();
   389			}
   390		}
   391	
   392		return fdt;
   393	}
   394	
   395	struct files_struct *get_files_struct(struct task_struct *task)

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

      reply	other threads:[~2015-10-08 19:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-08 18:08 Mateusz Guzik
2015-10-08 19:08 ` kbuild test robot [this message]

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=201510090309.gqPUUxHc%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=edumazet@google.com \
    --cc=kbuild-all@01.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mguzik@redhat.com \
    --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

all inboxes | Powered by JetHome®