oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Paulo Alcantara <pc@manguebit.com>, smfrench@gmail.com
Cc: oe-kbuild-all@lists.linux.dev, linux-cifs@vger.kernel.org,
	Paulo Alcantara <pc@manguebit.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH 7/7] cifs: fix sharing of DFS connections
Date: Thu, 4 May 2023 13:14:25 +0800	[thread overview]
Message-ID: <202305041040.j7W2xQSy-lkp@intel.com> (raw)
In-Reply-To: <20230503222117.7609-8-pc@manguebit.com>

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-potential-race-when-tree-connecting-ipc/20230504-062335
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@intel.com/config)
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/5a2a7b1846bb61ee5669afdfe2238eaa80c339c2
        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	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

       reply	other threads:[~2023-05-04  5:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230503222117.7609-8-pc@manguebit.com>
2023-05-04  5:14 ` kernel test robot [this message]
2023-05-04 10:37 ` [PATCH 7/7] cifs: fix sharing of DFS connections kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202305041040.j7W2xQSy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pc@manguebit.com \
    --cc=smfrench@gmail.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).