Re: [PATCH] rds: synchronize info callbacks with connection teardown

kernel test robot <[email protected]>
Newsgroups org.kernel.vger.stable,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel,org.kernel.vger.linux-rdma,org.kernel.vger.netdev
Message-ID <[email protected]>
Hi Chengfeng,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net/main]
[also build test WARNING on linus/master horms-ipvs/master v7.2-rc7]
[cannot apply to net-next/main next-20260812]
[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/Chengfeng-Ye/rds-synchronize-info-callbacks-with-connection-teardown/20260812-225931
base:   net/main
patch link:    https://lore.kernel.org/r/20260720184955.3008978-1-nicoyip.dev%40gmail.com
patch subject: [PATCH] rds: synchronize info callbacks with connection teardown
config: mips-randconfig-r134-20260813 (https://download.01.org/0day-ci/archive/20260814/[email protected]/config)
compiler: mips-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260814/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

sparse warnings: (new ones prefixed by >>)
>> net/rds/info.c:83:9: sparse: sparse: cast removes address space '__rcu' of expression
>> net/rds/info.c:83:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/rds/info.c:83:9: sparse:    void ( [noderef] __rcu * )( ... )
   net/rds/info.c:83:9: sparse:    void ( * )( ... )
   net/rds/info.c:84:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/rds/info.c:84:9: sparse:    void ( [noderef] __rcu * )( ... )
   net/rds/info.c:84:9: sparse:    void ( * )( ... )
   net/rds/info.c:96:9: sparse: sparse: cast removes address space '__rcu' of expression
   net/rds/info.c:96:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/rds/info.c:96:9: sparse:    void ( [noderef] __rcu * )( ... )
   net/rds/info.c:96:9: sparse:    void ( * )( ... )
   net/rds/info.c:97:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/rds/info.c:97:9: sparse:    void ( [noderef] __rcu * )( ... )
   net/rds/info.c:97:9: sparse:    void ( * )( ... )
   net/rds/info.c:222:16: sparse: sparse: cast removes address space '__rcu' of expression
   net/rds/info.c:222:16: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/rds/info.c:222:16: sparse:    void ( [noderef] __rcu * )( ... )
   net/rds/info.c:222:16: sparse:    void ( * )( ... )

vim +/__rcu +83 net/rds/info.c

    75	
    76	void rds_info_register_func(int optname, rds_info_func func)
    77	{
    78		int offset = optname - RDS_INFO_FIRST;
    79	
    80		BUG_ON(optname < RDS_INFO_FIRST || optname > RDS_INFO_LAST);
    81	
    82		spin_lock(&rds_info_lock);
  > 83		BUG_ON(rcu_access_pointer(rds_info_funcs[offset]));
    84		rcu_assign_pointer(rds_info_funcs[offset], func);
    85		spin_unlock(&rds_info_lock);
    86	}
    87	EXPORT_SYMBOL_GPL(rds_info_register_func);
    88	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.