Re: [PATCH v4 4/5] SUNRPC enforce creation of no more than max_connect xprts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Olga,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on nfs/linux-next]
[also build test WARNING on v5.14-rc7 next-20210824]
[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]

url:    https://github.com/0day-ci/linux/commits/Olga-Kornievskaia/do-not-collapse-trunkable-transports/20210825-020441
base:   git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-s001-20210824 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-348-gf0e6938b-dirty
        # https://github.com/0day-ci/linux/commit/9ac1118603b73fd71cf8746cd9a93ddefa97969c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Olga-Kornievskaia/do-not-collapse-trunkable-transports/20210825-020441
        git checkout 9ac1118603b73fd71cf8746cd9a93ddefa97969c
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/sunrpc/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
>> net/sunrpc/clnt.c:2779:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> net/sunrpc/clnt.c:2779:17: sparse:    char const [noderef] __rcu *
>> net/sunrpc/clnt.c:2779:17: sparse:    char const *

vim +2779 net/sunrpc/clnt.c

  2762	
  2763	/**
  2764	 * rpc_clnt_test_and_add_xprt - Test and add a new transport to a rpc_clnt
  2765	 * @clnt: pointer to struct rpc_clnt
  2766	 * @xps: pointer to struct rpc_xprt_switch,
  2767	 * @xprt: pointer struct rpc_xprt
  2768	 * @dummy: unused
  2769	 */
  2770	int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt,
  2771			struct rpc_xprt_switch *xps, struct rpc_xprt *xprt,
  2772			void *dummy)
  2773	{
  2774		struct rpc_cb_add_xprt_calldata *data;
  2775		struct rpc_task *task;
  2776	
  2777		if (xps->xps_nunique_destaddr_xprts + 1 > clnt->cl_max_connect) {
  2778			rcu_read_lock();
> 2779			pr_warn("SUNRPC: reached max allowed number (%d) did not add "
  2780				"transport to server: %s\n", clnt->cl_max_connect,
  2781				rcu_dereference(xprt->address_strings[RPC_DISPLAY_ADDR]));
  2782			rcu_read_unlock();
  2783			return -EINVAL;
  2784		}
  2785	
  2786		data = kmalloc(sizeof(*data), GFP_NOFS);
  2787		if (!data)
  2788			return -ENOMEM;
  2789		data->xps = xprt_switch_get(xps);
  2790		data->xprt = xprt_get(xprt);
  2791		if (rpc_xprt_switch_has_addr(data->xps, (struct sockaddr *)&xprt->addr)) {
  2792			rpc_cb_add_xprt_release(data);
  2793			goto success;
  2794		}
  2795	
  2796		task = rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC,
  2797				&rpc_cb_add_xprt_call_ops, data);
  2798		data->xps->xps_nunique_destaddr_xprts++;
  2799		rpc_put_task(task);
  2800	success:
  2801		return 1;
  2802	}
  2803	EXPORT_SYMBOL_GPL(rpc_clnt_test_and_add_xprt);
  2804	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux