Hi Paulo,
kernel test robot noticed the following build warnings:
[auto build test WARNING on v6.3] [also build test WARNING on linus/master next-20230428] [cannot apply to cifs/for-next] [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/Paulo-Alcantara/cifs-fix-pote... base: 457391b0380335d5e9a5babdec90ac53928b23b4 patch link: https://lore.kernel.org/r/20230503222117.7609-8-pc%40manguebit.com patch subject: [PATCH 7/7] cifs: fix sharing of DFS connections config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20230504/202305041040.j7W2xQSy-lkp@i...) compiler: m68k-linux-gcc (GCC) 12.1.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 # https://github.com/intel-lab-lkp/linux/commit/5a2a7b1846bb61ee5669afdfe2238e... git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Paulo-Alcantara/cifs-fix-potential-race-when-tree-connecting-ipc/20230504-062335 git checkout 5a2a7b1846bb61ee5669afdfe2238eaa80c339c2 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash fs/
If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot lkp@intel.com | Link: https://lore.kernel.org/oe-kbuild-all/202305041040.j7W2xQSy-lkp@intel.com/
All warnings (new ones prefixed by >>):
fs/cifs/connect.c: In function 'cifs_put_tcon':
fs/cifs/connect.c:2310:33: warning: variable 'server' set but not used [-Wunused-but-set-variable]
2310 | struct TCP_Server_Info *server; | ^~~~~~
vim +/server +2310 fs/cifs/connect.c
2306 2307 void 2308 cifs_put_tcon(struct cifs_tcon *tcon) 2309 {
2310 struct TCP_Server_Info *server;
2311 struct cifs_ses *ses; 2312 unsigned int xid; 2313 2314 /* 2315 * IPC tcon share the lifetime of their session and are 2316 * destroyed in the session put function 2317 */ 2318 if (tcon == NULL || tcon->ipc) 2319 return; 2320 2321 ses = tcon->ses; 2322 server = ses->server; 2323 cifs_dbg(FYI, "%s: tc_count=%d\n", __func__, tcon->tc_count); 2324 spin_lock(&cifs_tcp_ses_lock); 2325 spin_lock(&tcon->tc_lock); 2326 if (--tcon->tc_count > 0) { 2327 spin_unlock(&tcon->tc_lock); 2328 spin_unlock(&cifs_tcp_ses_lock); 2329 return; 2330 } 2331 2332 /* tc_count can never go negative */ 2333 WARN_ON(tcon->tc_count < 0); 2334 2335 list_del_init(&tcon->tcon_list); 2336 tcon->status = TID_EXITING; 2337 spin_unlock(&tcon->tc_lock); 2338 spin_unlock(&cifs_tcp_ses_lock); 2339 2340 /* cancel polling of interfaces */ 2341 cancel_delayed_work_sync(&tcon->query_interfaces); 2342 #ifdef CONFIG_CIFS_DFS_UPCALL 2343 cancel_delayed_work_sync(&tcon->dfs_cache_work); 2344 #endif 2345 2346 if (tcon->use_witness) { 2347 int rc; 2348 2349 rc = cifs_swn_unregister(tcon); 2350 if (rc < 0) { 2351 cifs_dbg(VFS, "%s: Failed to unregister for witness notifications: %d\n", 2352 __func__, rc); 2353 } 2354 } 2355 2356 xid = get_xid(); 2357 if (ses->server->ops->tree_disconnect) 2358 ses->server->ops->tree_disconnect(xid, tcon); 2359 _free_xid(xid); 2360 2361 cifs_fscache_release_super_cookie(tcon); 2362 tconInfoFree(tcon); 2363 cifs_put_smb_ses(ses); 2364 } 2365