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: <202005212350.Cd6GpknU%lkp@intel.com>
Date:   Thu, 21 May 2020 23:34:17 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Yanhu Cao <gmayyyha@...il.com>, jlayton@...nel.org
Cc:     kbuild-all@...ts.01.org, idryomov@...il.com,
        ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Yanhu Cao <gmayyyha@...il.com>
Subject: Re: [PATCH] ceph: show max caps in debugfs caps file

Hi Yanhu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on ceph-client/for-linus]
[also build test WARNING on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Yanhu-Cao/ceph-show-max-caps-in-debugfs-caps-file/20200521-190841
base:   https://github.com/ceph/ceph-client.git for-linus
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@...el.com>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

fs/ceph/debugfs.c: In function 'caps_show':
>> fs/ceph/debugfs.c:146:16: warning: too many arguments for format [-Wformat-extra-args]
146 |  seq_printf(s, "totaltt%dn"
|                ^~~~~~~~~~~~~~~

vim +146 fs/ceph/debugfs.c

ff4a80bf2d3f80 Jeff Layton  2019-04-24  136  
76aa844d5b2fb8 Sage Weil    2009-10-06  137  static int caps_show(struct seq_file *s, void *p)
76aa844d5b2fb8 Sage Weil    2009-10-06  138  {
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06  139  	struct ceph_fs_client *fsc = s->private;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  140  	struct ceph_mds_client *mdsc = fsc->mdsc;
d35440110f623b Yanhu Cao    2020-05-21  141  	int total, avail, used, max, reserved, min, i;
3a3430affce5de Jeff Layton  2019-11-20  142  	struct cap_wait	*cw;
76aa844d5b2fb8 Sage Weil    2009-10-06  143  
d35440110f623b Yanhu Cao    2020-05-21  144  	ceph_reservation_status(fsc, &total, &avail, &used, &max,
d35440110f623b Yanhu Cao    2020-05-21  145  				&reserved, &min);
76aa844d5b2fb8 Sage Weil    2009-10-06 @146  	seq_printf(s, "total\t\t%d\n"
76aa844d5b2fb8 Sage Weil    2009-10-06  147  		   "avail\t\t%d\n"
76aa844d5b2fb8 Sage Weil    2009-10-06  148  		   "used\t\t%d\n"
85ccce43a3fc15 Sage Weil    2010-02-17  149  		   "reserved\t%d\n"
ff4a80bf2d3f80 Jeff Layton  2019-04-24  150  		   "min\t\t%d\n\n",
d35440110f623b Yanhu Cao    2020-05-21  151  		   total, avail, used, max, reserved, min);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  152  	seq_printf(s, "ino                issued           implemented\n");
ff4a80bf2d3f80 Jeff Layton  2019-04-24  153  	seq_printf(s, "-----------------------------------------------\n");
ff4a80bf2d3f80 Jeff Layton  2019-04-24  154  
ff4a80bf2d3f80 Jeff Layton  2019-04-24  155  	mutex_lock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  156  	for (i = 0; i < mdsc->max_sessions; i++) {
ff4a80bf2d3f80 Jeff Layton  2019-04-24  157  		struct ceph_mds_session *session;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  158  
ff4a80bf2d3f80 Jeff Layton  2019-04-24  159  		session = __ceph_lookup_mds_session(mdsc, i);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  160  		if (!session)
ff4a80bf2d3f80 Jeff Layton  2019-04-24  161  			continue;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  162  		mutex_unlock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  163  		mutex_lock(&session->s_mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  164  		ceph_iterate_session_caps(session, caps_show_cb, s);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  165  		mutex_unlock(&session->s_mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  166  		ceph_put_mds_session(session);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  167  		mutex_lock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  168  	}
ff4a80bf2d3f80 Jeff Layton  2019-04-24  169  	mutex_unlock(&mdsc->mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  170  
3a3430affce5de Jeff Layton  2019-11-20  171  	seq_printf(s, "\n\nWaiters:\n--------\n");
3a3430affce5de Jeff Layton  2019-11-20  172  	seq_printf(s, "tgid         ino                need             want\n");
3a3430affce5de Jeff Layton  2019-11-20  173  	seq_printf(s, "-----------------------------------------------------\n");
3a3430affce5de Jeff Layton  2019-11-20  174  
3a3430affce5de Jeff Layton  2019-11-20  175  	spin_lock(&mdsc->caps_list_lock);
3a3430affce5de Jeff Layton  2019-11-20  176  	list_for_each_entry(cw, &mdsc->cap_wait_list, list) {
3a3430affce5de Jeff Layton  2019-11-20  177  		seq_printf(s, "%-13d0x%-17lx%-17s%-17s\n", cw->tgid, cw->ino,
3a3430affce5de Jeff Layton  2019-11-20  178  				ceph_cap_string(cw->need),
3a3430affce5de Jeff Layton  2019-11-20  179  				ceph_cap_string(cw->want));
3a3430affce5de Jeff Layton  2019-11-20  180  	}
3a3430affce5de Jeff Layton  2019-11-20  181  	spin_unlock(&mdsc->caps_list_lock);
3a3430affce5de Jeff Layton  2019-11-20  182  
76aa844d5b2fb8 Sage Weil    2009-10-06  183  	return 0;
76aa844d5b2fb8 Sage Weil    2009-10-06  184  }
76aa844d5b2fb8 Sage Weil    2009-10-06  185  

:::::: The code at line 146 was first introduced by commit
:::::: 76aa844d5b2fb8c839180d3f5874e333b297e5fd ceph: debugfs

:::::: TO: Sage Weil <sage@...dream.net>
:::::: CC: Sage Weil <sage@...dream.net>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Download attachment ".config.gz" of type "application/gzip" (63393 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ