* [brauner-github:kernel-6.19.cred 12/39] fs/backing-file.c:209:9: warning: variable 'ret' is uninitialized when used here
@ 2025-11-04 9:43 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-04 9:43 UTC (permalink / raw)
To: Christian Brauner; +Cc: llvm, oe-kbuild-all, Christian Brauner, Amir Goldstein
tree: https://github.com/brauner/linux.git kernel-6.19.cred
head: 59e578cf86c391d6595e005247ebefd4f371242c
commit: b9455f57e32048146ad5b98fb477b96eba6e8ffd [12/39] backing-file: use credential guards for reads
config: hexagon-randconfig-002-20251104 (https://download.01.org/0day-ci/archive/20251104/202511041731.OPKyrqmX-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511041731.OPKyrqmX-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/202511041731.OPKyrqmX-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/backing-file.c:209:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
fs/backing-file.c:191:13: note: initialize the variable 'ret' to silence this warning
ssize_t ret;
^
= 0
1 warning generated.
vim +/ret +209 fs/backing-file.c
b9455f57e320481 Christian Brauner 2025-11-03 186
b9455f57e320481 Christian Brauner 2025-11-03 187 ssize_t backing_file_read_iter(struct file *file, struct iov_iter *iter,
b9455f57e320481 Christian Brauner 2025-11-03 188 struct kiocb *iocb, int flags,
b9455f57e320481 Christian Brauner 2025-11-03 189 struct backing_file_ctx *ctx)
b9455f57e320481 Christian Brauner 2025-11-03 190 {
b9455f57e320481 Christian Brauner 2025-11-03 191 ssize_t ret;
b9455f57e320481 Christian Brauner 2025-11-03 192
b9455f57e320481 Christian Brauner 2025-11-03 193 if (WARN_ON_ONCE(!(file->f_mode & FMODE_BACKING)))
b9455f57e320481 Christian Brauner 2025-11-03 194 return -EIO;
b9455f57e320481 Christian Brauner 2025-11-03 195
b9455f57e320481 Christian Brauner 2025-11-03 196 if (!iov_iter_count(iter))
b9455f57e320481 Christian Brauner 2025-11-03 197 return 0;
b9455f57e320481 Christian Brauner 2025-11-03 198
b9455f57e320481 Christian Brauner 2025-11-03 199 if (iocb->ki_flags & IOCB_DIRECT &&
b9455f57e320481 Christian Brauner 2025-11-03 200 !(file->f_mode & FMODE_CAN_ODIRECT))
b9455f57e320481 Christian Brauner 2025-11-03 201 return -EINVAL;
b9455f57e320481 Christian Brauner 2025-11-03 202
b9455f57e320481 Christian Brauner 2025-11-03 203 scoped_with_creds(ctx->cred)
b9455f57e320481 Christian Brauner 2025-11-03 204 do_backing_file_read_iter(file, iter, iocb, flags);
a6293b3e285cd0d Amir Goldstein 2023-11-22 205
a6293b3e285cd0d Amir Goldstein 2023-11-22 206 if (ctx->accessed)
48b50624aec454c Miklos Szeredi 2024-10-21 207 ctx->accessed(iocb->ki_filp);
a6293b3e285cd0d Amir Goldstein 2023-11-22 208
a6293b3e285cd0d Amir Goldstein 2023-11-22 @209 return ret;
a6293b3e285cd0d Amir Goldstein 2023-11-22 210 }
a6293b3e285cd0d Amir Goldstein 2023-11-22 211 EXPORT_SYMBOL_GPL(backing_file_read_iter);
a6293b3e285cd0d Amir Goldstein 2023-11-22 212
:::::: The code at line 209 was first introduced by commit
:::::: a6293b3e285cd0d7692141d7981a5f144f0e2f0b fs: factor out backing_file_{read,write}_iter() helpers
:::::: TO: Amir Goldstein <amir73il@gmail.com>
:::::: CC: Amir Goldstein <amir73il@gmail.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-04 9:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 9:43 [brauner-github:kernel-6.19.cred 12/39] fs/backing-file.c:209:9: warning: variable 'ret' is uninitialized when used here kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox