From: kernel test robot <lkp@intel.com>
To: Christian Brauner <brauner@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 8227/9575] fs/libfs.c:2018:13: sparse: sparse: Using plain integer as NULL pointer
Date: Mon, 26 Feb 2024 13:10:02 +0800 [thread overview]
Message-ID: <202402261334.nvl11hSF-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 33e1d31873f87d119e5120b88cd350efa68ef276
commit: 6cac4ea940896aa83f82e01fa22965f51a6158bc [8227/9575] libfs: add path_from_stashed()
config: hexagon-randconfig-r113-20240226 (https://download.01.org/0day-ci/archive/20240226/202402261334.nvl11hSF-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project edd4aee4dd9b5b98b2576a6f783e4086173d902a)
reproduce: (https://download.01.org/0day-ci/archive/20240226/202402261334.nvl11hSF-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/202402261334.nvl11hSF-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> fs/libfs.c:2018:13: sparse: sparse: Using plain integer as NULL pointer
fs/libfs.c:2049:5: sparse: sparse: context imbalance in 'path_from_stashed' - wrong count at exit
vim +2018 fs/libfs.c
1989
1990 static struct dentry *stash_dentry(struct dentry **stashed, unsigned long ino,
1991 struct super_block *sb,
1992 const struct file_operations *fops,
1993 void *data)
1994 {
1995 struct dentry *dentry;
1996 struct inode *inode;
1997
1998 dentry = d_alloc_anon(sb);
1999 if (!dentry)
2000 return ERR_PTR(-ENOMEM);
2001
2002 inode = new_inode_pseudo(sb);
2003 if (!inode) {
2004 dput(dentry);
2005 return ERR_PTR(-ENOMEM);
2006 }
2007
2008 inode->i_ino = ino;
2009 inode->i_flags |= S_IMMUTABLE;
2010 inode->i_mode = S_IFREG | S_IRUGO;
2011 inode->i_fop = fops;
2012 inode->i_private = data;
2013 simple_inode_init_ts(inode);
2014
2015 /* @data is now owned by the fs */
2016 d_instantiate(dentry, inode);
2017
> 2018 if (cmpxchg(stashed, NULL, dentry)) {
2019 d_delete(dentry); /* make sure ->d_prune() does nothing */
2020 dput(dentry);
2021 cpu_relax();
2022 return ERR_PTR(-EAGAIN);
2023 }
2024
2025 return dentry;
2026 }
2027
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-02-26 5:10 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=202402261334.nvl11hSF-lkp@intel.com \
--to=lkp@intel.com \
--cc=brauner@kernel.org \
--cc=linux-mm@kvack.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox