From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org
Subject: [dhowells-fs:fscache-rewrite-indexing 74/74] fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here
Date: Thu, 14 Oct 2021 06:08:56 +0800 [thread overview]
Message-ID: <202110140648.mvwsAGc2-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4173 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing
head: c4c64220b16dd9204a79685fe34d61c1b7f858a6
commit: c4c64220b16dd9204a79685fe34d61c1b7f858a6 [74/74] cachefiles: Add tracepoints to log errors from ops on the backing fs
config: i386-randconfig-r034-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=c4c64220b16dd9204a79685fe34d61c1b7f858a6
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing
git checkout c4c64220b16dd9204a79685fe34d61c1b7f858a6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
^~~
fs/cachefiles/namei.c:331:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +347 fs/cachefiles/namei.c
320
321 /*
322 * Open an existing file, checking its attributes and replacing it if it is
323 * stale.
324 */
325 static bool cachefiles_open_file(struct cachefiles_object *object,
326 struct dentry *dentry)
327 {
328 struct cachefiles_cache *cache = object->volume->cache;
329 struct file *file;
330 struct path path;
331 int ret;
332
333 _enter("%pd", dentry);
334
335 if (!cachefiles_mark_inode_in_use(object, dentry))
336 return false;
337
338 /* We need to open a file interface onto a data file now as we can't do
339 * it on demand because writeback called from do_exit() sees
340 * current->fs == NULL - which breaks d_path() called from ext4 open.
341 */
342 path.mnt = cache->mnt;
343 path.dentry = dentry;
344 file = open_with_fake_path(&path, O_RDWR | O_LARGEFILE | O_DIRECT,
345 d_backing_inode(dentry), cache->cache_cred);
346 if (IS_ERR(file)) {
> 347 trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
348 cachefiles_trace_open_error);
349 goto error;
350 }
351
352 if (unlikely(!file->f_op->read_iter) ||
353 unlikely(!file->f_op->write_iter)) {
354 pr_notice("Cache does not support read_iter and write_iter\n");
355 goto error_fput;
356 }
357 _debug("file -> %pd positive", dentry);
358
359 ret = cachefiles_check_auxdata(object, file);
360 if (ret < 0)
361 goto check_failed;
362
363 object->file = file;
364
365 /* Always update the atime on an object we've just looked up (this is
366 * used to keep track of culling, and atimes are only updated by read,
367 * write and readdir but not lookup or open).
368 */
369 touch_atime(&file->f_path);
370 dput(dentry);
371 return true;
372
373 check_failed:
374 fscache_cookie_lookup_negative(object->cookie);
375 cachefiles_unmark_inode_in_use(object, file);
376 cachefiles_mark_object_inactive(object, file);
377 if (ret == -ESTALE) {
378 fput(file);
379 dput(dentry);
380 return cachefiles_create_file(object);
381 }
382 error_fput:
383 fput(file);
384 error:
385 dput(dentry);
386 return false;
387 }
388
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34101 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [dhowells-fs:fscache-rewrite-indexing 74/74] fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here
Date: Thu, 14 Oct 2021 06:08:56 +0800 [thread overview]
Message-ID: <202110140648.mvwsAGc2-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4280 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-rewrite-indexing
head: c4c64220b16dd9204a79685fe34d61c1b7f858a6
commit: c4c64220b16dd9204a79685fe34d61c1b7f858a6 [74/74] cachefiles: Add tracepoints to log errors from ops on the backing fs
config: i386-randconfig-r034-20211013 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a8c695542b2987eb9a203d5663a0740cb4725f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=c4c64220b16dd9204a79685fe34d61c1b7f858a6
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-rewrite-indexing
git checkout c4c64220b16dd9204a79685fe34d61c1b7f858a6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
^~~
fs/cachefiles/namei.c:331:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +347 fs/cachefiles/namei.c
320
321 /*
322 * Open an existing file, checking its attributes and replacing it if it is
323 * stale.
324 */
325 static bool cachefiles_open_file(struct cachefiles_object *object,
326 struct dentry *dentry)
327 {
328 struct cachefiles_cache *cache = object->volume->cache;
329 struct file *file;
330 struct path path;
331 int ret;
332
333 _enter("%pd", dentry);
334
335 if (!cachefiles_mark_inode_in_use(object, dentry))
336 return false;
337
338 /* We need to open a file interface onto a data file now as we can't do
339 * it on demand because writeback called from do_exit() sees
340 * current->fs == NULL - which breaks d_path() called from ext4 open.
341 */
342 path.mnt = cache->mnt;
343 path.dentry = dentry;
344 file = open_with_fake_path(&path, O_RDWR | O_LARGEFILE | O_DIRECT,
345 d_backing_inode(dentry), cache->cache_cred);
346 if (IS_ERR(file)) {
> 347 trace_cachefiles_vfs_error(object, d_backing_inode(dentry), ret,
348 cachefiles_trace_open_error);
349 goto error;
350 }
351
352 if (unlikely(!file->f_op->read_iter) ||
353 unlikely(!file->f_op->write_iter)) {
354 pr_notice("Cache does not support read_iter and write_iter\n");
355 goto error_fput;
356 }
357 _debug("file -> %pd positive", dentry);
358
359 ret = cachefiles_check_auxdata(object, file);
360 if (ret < 0)
361 goto check_failed;
362
363 object->file = file;
364
365 /* Always update the atime on an object we've just looked up (this is
366 * used to keep track of culling, and atimes are only updated by read,
367 * write and readdir but not lookup or open).
368 */
369 touch_atime(&file->f_path);
370 dput(dentry);
371 return true;
372
373 check_failed:
374 fscache_cookie_lookup_negative(object->cookie);
375 cachefiles_unmark_inode_in_use(object, file);
376 cachefiles_mark_object_inactive(object, file);
377 if (ret == -ESTALE) {
378 fput(file);
379 dput(dentry);
380 return cachefiles_create_file(object);
381 }
382 error_fput:
383 fput(file);
384 error:
385 dput(dentry);
386 return false;
387 }
388
---
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: 34101 bytes --]
next reply other threads:[~2021-10-13 22:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 22:08 kernel test robot [this message]
2021-10-13 22:08 ` [dhowells-fs:fscache-rewrite-indexing 74/74] fs/cachefiles/namei.c:347:63: warning: variable 'ret' is uninitialized when used here kernel test robot
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=202110140648.mvwsAGc2-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@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.