lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211042141.hTJqK4L5-lkp@intel.com>
Date:   Fri, 4 Nov 2022 22:05:36 +0800
From:   kernel test robot <lkp@...el.com>
To:     Luís Henriques <lhenriques@...e.de>,
        Xiubo Li <xiubli@...hat.com>,
        Ilya Dryomov <idryomov@...il.com>,
        Jeff Layton <jlayton@...nel.org>
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Luís Henriques <lhenriques@...e.de>
Subject: Re: [PATCH] ceph: fix memory leak in mount error path when using
 test_dummy_encryption

Hi Luís,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ceph-client/for-linus]
[also build test ERROR on linus/master v6.1-rc3 next-20221104]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Lu-s-Henriques/ceph-fix-memory-leak-in-mount-error-path-when-using-test_dummy_encryption/20221103-233629
base:   https://github.com/ceph/ceph-client.git for-linus
patch link:    https://lore.kernel.org/r/20221103153619.11068-1-lhenriques%40suse.de
patch subject: [PATCH] ceph: fix memory leak in mount error path when using test_dummy_encryption
config: hexagon-buildonly-randconfig-r006-20221104
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 2bbafe04fe785a9469bea5a3737f8d7d3ce4aca2)
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://github.com/intel-lab-lkp/linux/commit/2a75b40477b60d0aba1b72379f7142225bea2a48
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Lu-s-Henriques/ceph-fix-memory-leak-in-mount-error-path-when-using-test_dummy_encryption/20221103-233629
        git checkout 2a75b40477b60d0aba1b72379f7142225bea2a48
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash fs/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

   fs/ceph/super.c:1268:2: error: call to undeclared function 'fscrypt_free_dummy_policy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           fscrypt_free_dummy_policy(&fsc->fsc_dummy_enc_policy);
           ^
>> fs/ceph/super.c:1268:34: error: no member named 'fsc_dummy_enc_policy' in 'struct ceph_fs_client'
           fscrypt_free_dummy_policy(&fsc->fsc_dummy_enc_policy);
                                      ~~~  ^
   2 errors generated.


vim +1268 fs/ceph/super.c

  1196	
  1197	static int ceph_get_tree(struct fs_context *fc)
  1198	{
  1199		struct ceph_parse_opts_ctx *pctx = fc->fs_private;
  1200		struct ceph_mount_options *fsopt = pctx->opts;
  1201		struct super_block *sb;
  1202		struct ceph_fs_client *fsc;
  1203		struct dentry *res;
  1204		int (*compare_super)(struct super_block *, struct fs_context *) =
  1205			ceph_compare_super;
  1206		int err;
  1207	
  1208		dout("ceph_get_tree\n");
  1209	
  1210		if (!fc->source)
  1211			return invalfc(fc, "No source");
  1212		if (fsopt->new_dev_syntax && !fsopt->mon_addr)
  1213			return invalfc(fc, "No monitor address");
  1214	
  1215		/* create client (which we may/may not use) */
  1216		fsc = create_fs_client(pctx->opts, pctx->copts);
  1217		pctx->opts = NULL;
  1218		pctx->copts = NULL;
  1219		if (IS_ERR(fsc)) {
  1220			err = PTR_ERR(fsc);
  1221			goto out_final;
  1222		}
  1223	
  1224		err = ceph_mdsc_init(fsc);
  1225		if (err < 0)
  1226			goto out;
  1227	
  1228		if (ceph_test_opt(fsc->client, NOSHARE))
  1229			compare_super = NULL;
  1230	
  1231		fc->s_fs_info = fsc;
  1232		sb = sget_fc(fc, compare_super, ceph_set_super);
  1233		fc->s_fs_info = NULL;
  1234		if (IS_ERR(sb)) {
  1235			err = PTR_ERR(sb);
  1236			goto out;
  1237		}
  1238	
  1239		if (ceph_sb_to_client(sb) != fsc) {
  1240			destroy_fs_client(fsc);
  1241			fsc = ceph_sb_to_client(sb);
  1242			dout("get_sb got existing client %p\n", fsc);
  1243		} else {
  1244			dout("get_sb using new client %p\n", fsc);
  1245			err = ceph_setup_bdi(sb, fsc);
  1246			if (err < 0)
  1247				goto out_splat;
  1248		}
  1249	
  1250		res = ceph_real_mount(fsc, fc);
  1251		if (IS_ERR(res)) {
  1252			err = PTR_ERR(res);
  1253			goto out_splat;
  1254		}
  1255		dout("root %p inode %p ino %llx.%llx\n", res,
  1256		     d_inode(res), ceph_vinop(d_inode(res)));
  1257		fc->root = fsc->sb->s_root;
  1258		return 0;
  1259	
  1260	out_splat:
  1261		if (!ceph_mdsmap_is_cluster_available(fsc->mdsc->mdsmap)) {
  1262			pr_info("No mds server is up or the cluster is laggy\n");
  1263			err = -EHOSTUNREACH;
  1264		}
  1265	
  1266		ceph_mdsc_close_sessions(fsc->mdsc);
  1267		deactivate_locked_super(sb);
> 1268		fscrypt_free_dummy_policy(&fsc->fsc_dummy_enc_policy);
  1269		goto out_final;
  1270	
  1271	out:
  1272		destroy_fs_client(fsc);
  1273	out_final:
  1274		dout("ceph_get_tree fail %d\n", err);
  1275		return err;
  1276	}
  1277	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (122152 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ