tree:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
for-5.12/io_uring
head: ddebaa7f62a202b40378a5a71d1a51737277d773
commit: 5af393d9a934d576bb13e45eac17ed5c1129a2f6 [28/34] fs: provide locked helper variant
of close_fd_get_file()
config: x86_64-randconfig-s022-20210120 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/com...
git remote add block
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags block for-5.12/io_uring
git checkout 5af393d9a934d576bb13e45eac17ed5c1129a2f6
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> fs/file.c:738:5: warning: no previous prototype for
'__close_fd_get_file' [-Wmissing-prototypes]
738 | int
__close_fd_get_file(unsigned int fd, struct file **res)
| ^~~~~~~~~~~~~~~~~~~
vim +/__close_fd_get_file +738 fs/file.c
733
734 /*
735 * See close_fd_get_file() below, this variant assumes
current->files->file_lock
736 * is held.
737 */
738 int __close_fd_get_file(unsigned int fd, struct file **res)
739 {
740 struct files_struct *files = current->files;
741 struct file *file;
742 struct fdtable *fdt;
743
744 fdt = files_fdtable(files);
745 if (fd >= fdt->max_fds)
746 goto out_err;
747 file = fdt->fd[fd];
748 if (!file)
749 goto out_err;
750 rcu_assign_pointer(fdt->fd[fd], NULL);
751 __put_unused_fd(files, fd);
752 get_file(file);
753 *res = file;
754 return 0;
755 out_err:
756 *res = NULL;
757 return -ENOENT;
758 }
759
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org