All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [vfs:work.d_path 3/14] fs/d_path.c:359:25: sparse: sparse: context imbalance in '__dentry_path' - wrong count at exit
Date: Wed, 09 Jun 2021 06:34:05 +0800	[thread overview]
Message-ID: <202106090657.SX93PXWs-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4088 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-fsdevel(a)vger.kernel.org
TO: Al Viro <viro@zeniv.linux.org.uk>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.d_path
head:   e4b275531887fef7f7d8a7284bfc32f0fbbd4208
commit: 3acca043261fa6268961d152ea2505e217eabcba [3/14] d_path: regularize handling of root dentry in __dentry_path()
:::::: branch date: 3 weeks ago
:::::: commit date: 3 weeks ago
config: riscv-randconfig-s031-20210608 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git/commit/?id=3acca043261fa6268961d152ea2505e217eabcba
        git remote add vfs https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git
        git fetch --no-tags vfs work.d_path
        git checkout 3acca043261fa6268961d152ea2505e217eabcba
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=riscv 

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


sparse warnings: (new ones prefixed by >>)
   fs/d_path.c:159:9: sparse: sparse: context imbalance in 'prepend_path' - wrong count at exit
>> fs/d_path.c:359:25: sparse: sparse: context imbalance in '__dentry_path' - wrong count at exit

vim +/__dentry_path +359 fs/d_path.c

7a5cf791a74764 Al Viro 2018-03-05  325  
7a5cf791a74764 Al Viro 2018-03-05  326  /*
7a5cf791a74764 Al Viro 2018-03-05  327   * Write full pathname from the root of the filesystem into the buffer.
7a5cf791a74764 Al Viro 2018-03-05  328   */
3a291c974cf7ff Al Viro 2021-05-17  329  static char *__dentry_path(const struct dentry *d, char *p, int buflen)
7a5cf791a74764 Al Viro 2018-03-05  330  {
a2bbe66493ee38 Al Viro 2019-07-07  331  	const struct dentry *dentry;
3acca043261fa6 Al Viro 2021-05-17  332  	char *end;
7a5cf791a74764 Al Viro 2018-03-05  333  	int len, seq = 0;
7a5cf791a74764 Al Viro 2018-03-05  334  
7a5cf791a74764 Al Viro 2018-03-05  335  	rcu_read_lock();
7a5cf791a74764 Al Viro 2018-03-05  336  restart:
7a5cf791a74764 Al Viro 2018-03-05  337  	dentry = d;
3a291c974cf7ff Al Viro 2021-05-17  338  	end = p;
7a5cf791a74764 Al Viro 2018-03-05  339  	len = buflen;
7a5cf791a74764 Al Viro 2018-03-05  340  	read_seqbegin_or_lock(&rename_lock, &seq);
7a5cf791a74764 Al Viro 2018-03-05  341  	while (!IS_ROOT(dentry)) {
a2bbe66493ee38 Al Viro 2019-07-07  342  		const struct dentry *parent = dentry->d_parent;
7a5cf791a74764 Al Viro 2018-03-05  343  
7a5cf791a74764 Al Viro 2018-03-05  344  		prefetch(parent);
3acca043261fa6 Al Viro 2021-05-17  345  		if (unlikely(prepend_name(&end, &len, &dentry->d_name) < 0))
7a5cf791a74764 Al Viro 2018-03-05  346  			break;
7a5cf791a74764 Al Viro 2018-03-05  347  
7a5cf791a74764 Al Viro 2018-03-05  348  		dentry = parent;
7a5cf791a74764 Al Viro 2018-03-05  349  	}
7a5cf791a74764 Al Viro 2018-03-05  350  	if (!(seq & 1))
7a5cf791a74764 Al Viro 2018-03-05  351  		rcu_read_unlock();
7a5cf791a74764 Al Viro 2018-03-05  352  	if (need_seqretry(&rename_lock, seq)) {
7a5cf791a74764 Al Viro 2018-03-05  353  		seq = 1;
7a5cf791a74764 Al Viro 2018-03-05  354  		goto restart;
7a5cf791a74764 Al Viro 2018-03-05  355  	}
7a5cf791a74764 Al Viro 2018-03-05  356  	done_seqretry(&rename_lock, seq);
3acca043261fa6 Al Viro 2021-05-17  357  	if (len == buflen)
3acca043261fa6 Al Viro 2021-05-17  358  		prepend(&end, &len, "/", 1);
3acca043261fa6 Al Viro 2021-05-17 @359  	return len >= 0 ? end : ERR_PTR(-ENAMETOOLONG);
7a5cf791a74764 Al Viro 2018-03-05  360  }
7a5cf791a74764 Al Viro 2018-03-05  361  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40382 bytes --]

                 reply	other threads:[~2021-06-08 22:34 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=202106090657.SX93PXWs-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.