tree:
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git fs_fuse_split
head: 674d5faded4c40245ea02240e731aa82c7ab4c9e
commit: 674d5faded4c40245ea02240e731aa82c7ab4c9e [5/5] fuse: alloc initial fuse_conn and
fuse_mount
config: powerpc-randconfig-r025-20210209 (attached as .config)
compiler: clang version 12.0.0 (
https://github.com/llvm/llvm-project
c9439ca36342fb6013187d0a69aef92736951476)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
#
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/...
git remote add fuse
https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git
git fetch --no-tags fuse fs_fuse_split
git checkout 674d5faded4c40245ea02240e731aa82c7ab4c9e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
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/fuse/inode.c:1503:16: warning: variable 'fc' is
uninitialized when used here [-Wuninitialized]
fuse_conn_put(fc);
^~
fs/fuse/inode.c:1466:22: note: initialize the variable 'fc' to silence this
warning
struct fuse_conn *fc;
^
= NULL
1 warning generated.
vim +/fc +1503 fs/fuse/inode.c
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1460
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1461 static int fuse_fill_super(struct
super_block *sb, struct fs_context *fsc)
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1462 {
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1463 struct fuse_fs_context *ctx =
fsc->fs_private;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1464 struct file *file;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1465 int err;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1466 struct fuse_conn *fc;
fcee216beb9c15 Max Reitz 2020-05-06 1467 struct fuse_mount *fm;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1468
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1469 err = -EINVAL;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1470 file = fget(ctx->fd);
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1471 if (!file)
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1472 goto err;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1473
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1474 /*
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1475 * Require mount to happen from the same
user namespace which
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1476 * opened /dev/fuse to prevent potential
attacks.
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1477 */
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1478 if ((file->f_op !=
&fuse_dev_operations) ||
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1479 (file->f_cred->user_ns !=
sb->s_user_ns))
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1480 goto err_fput;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1481 ctx->fudptr =
&file->private_data;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1482
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1483 err = -ENOMEM;
674d5faded4c40 Miklos Szeredi 2021-02-11 1484 fm = fuse_conn_new(sb->s_user_ns,
&fuse_dev_fiq_ops, NULL, NULL, NULL);
674d5faded4c40 Miklos Szeredi 2021-02-11 1485 if (!fm)
fcee216beb9c15 Max Reitz 2020-05-06 1486 goto err_fput;
fcee216beb9c15 Max Reitz 2020-05-06 1487
fcee216beb9c15 Max Reitz 2020-05-06 1488 sb->s_fs_info = fm;
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1489
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1490 err = fuse_fill_super_common(sb, ctx);
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1491 if (err)
0cc2656cdb0b1f Stefan Hajnoczi 2018-06-13 1492 goto err_put_conn;
0720b315976447 Miklos Szeredi 2006-04-10 1493 /*
0720b315976447 Miklos Szeredi 2006-04-10 1494 * atomic_dec_and_test() in fput()
provides the necessary
0720b315976447 Miklos Szeredi 2006-04-10 1495 * memory barrier for
file->private_data to be visible on all
0720b315976447 Miklos Szeredi 2006-04-10 1496 * CPUs after this
0720b315976447 Miklos Szeredi 2006-04-10 1497 */
0720b315976447 Miklos Szeredi 2006-04-10 1498 fput(file);
fcee216beb9c15 Max Reitz 2020-05-06 1499
fuse_send_init(get_fuse_mount_super(sb));
d8a5ba45457e4a Miklos Szeredi 2005-09-09 1500 return 0;
d8a5ba45457e4a Miklos Szeredi 2005-09-09 1501
c2b8f006909b9b Miklos Szeredi 2009-01-26 1502 err_put_conn:
514b5e3ff45e6c Miklos Szeredi 2020-11-11 @1503 fuse_conn_put(fc);
514b5e3ff45e6c Miklos Szeredi 2020-11-11 1504 kfree(fm);
543b8f8662fe6d Tetsuo Handa 2018-05-01 1505 sb->s_fs_info = NULL;
c2b8f006909b9b Miklos Szeredi 2009-01-26 1506 err_fput:
c2b8f006909b9b Miklos Szeredi 2009-01-26 1507 fput(file);
c2b8f006909b9b Miklos Szeredi 2009-01-26 1508 err:
d8a5ba45457e4a Miklos Szeredi 2005-09-09 1509 return err;
d8a5ba45457e4a Miklos Szeredi 2005-09-09 1510 }
d8a5ba45457e4a Miklos Szeredi 2005-09-09 1511
:::::: The code at line 1503 was first introduced by commit
:::::: 514b5e3ff45e6cfc39cfa7c094727d8e6d885986 fuse: get rid of fuse_mount refcount
:::::: TO: Miklos Szeredi <mszeredi(a)redhat.com>
:::::: CC: Miklos Szeredi <mszeredi(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org