mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces)
@ 2020-08-16  9:35 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-16  9:35 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4212 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4b6c093e21d36bede0fd88fd0aeb3b03647260e4
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   8 weeks ago
config: s390-randconfig-s032-20200811 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-168-g9554805c-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

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


sparse warnings: (new ones prefixed by >>)

>> net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct tcp_congestion_ops const [noderef] __rcu * @@     got struct tcp_congestion_ops *[assigned] ca @@
>> net/ipv4/tcp_cong.c:228:24: sparse:     expected struct tcp_congestion_ops const [noderef] __rcu *
   net/ipv4/tcp_cong.c:228:24: sparse:     got struct tcp_congestion_ops *[assigned] ca
   net/ipv4/tcp_cong.c:228:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct tcp_congestion_ops const *prev @@     got struct tcp_congestion_ops const [noderef] __rcu *[assigned] __old @@
   net/ipv4/tcp_cong.c:228:22: sparse:     expected struct tcp_congestion_ops const *prev
   net/ipv4/tcp_cong.c:228:22: sparse:     got struct tcp_congestion_ops const [noderef] __rcu *[assigned] __old

vim +228 net/ipv4/tcp_cong.c

317a76f9a44b437 Stephen Hemminger 2005-06-23  213  
317a76f9a44b437 Stephen Hemminger 2005-06-23  214  /* Used by sysctl to change default congestion control */
6670e152447732b Stephen Hemminger 2017-11-14  215  int tcp_set_default_congestion_control(struct net *net, const char *name)
317a76f9a44b437 Stephen Hemminger 2005-06-23  216  {
317a76f9a44b437 Stephen Hemminger 2005-06-23  217  	struct tcp_congestion_ops *ca;
6670e152447732b Stephen Hemminger 2017-11-14  218  	const struct tcp_congestion_ops *prev;
6670e152447732b Stephen Hemminger 2017-11-14  219  	int ret;
317a76f9a44b437 Stephen Hemminger 2005-06-23  220  
6670e152447732b Stephen Hemminger 2017-11-14  221  	rcu_read_lock();
6670e152447732b Stephen Hemminger 2017-11-14  222  	ca = tcp_ca_find_autoload(net, name);
6670e152447732b Stephen Hemminger 2017-11-14  223  	if (!ca) {
6670e152447732b Stephen Hemminger 2017-11-14  224  		ret = -ENOENT;
0baf26b0fcd74bb Martin KaFai Lau  2020-01-08  225  	} else if (!bpf_try_module_get(ca, ca->owner)) {
6670e152447732b Stephen Hemminger 2017-11-14  226  		ret = -EBUSY;
6670e152447732b Stephen Hemminger 2017-11-14  227  	} else {
6670e152447732b Stephen Hemminger 2017-11-14 @228  		prev = xchg(&net->ipv4.tcp_congestion_control, ca);
6670e152447732b Stephen Hemminger 2017-11-14  229  		if (prev)
0baf26b0fcd74bb Martin KaFai Lau  2020-01-08  230  			bpf_module_put(prev, prev->owner);
317a76f9a44b437 Stephen Hemminger 2005-06-23  231  
6670e152447732b Stephen Hemminger 2017-11-14  232  		ca->flags |= TCP_CONG_NON_RESTRICTED;
317a76f9a44b437 Stephen Hemminger 2005-06-23  233  		ret = 0;
317a76f9a44b437 Stephen Hemminger 2005-06-23  234  	}
6670e152447732b Stephen Hemminger 2017-11-14  235  	rcu_read_unlock();
317a76f9a44b437 Stephen Hemminger 2005-06-23  236  
317a76f9a44b437 Stephen Hemminger 2005-06-23  237  	return ret;
317a76f9a44b437 Stephen Hemminger 2005-06-23  238  }
317a76f9a44b437 Stephen Hemminger 2005-06-23  239  

:::::: The code at line 228 was first introduced by commit
:::::: 6670e152447732ba90626f36dfc015a13fbf150e tcp: Namespace-ify sysctl_tcp_default_congestion_control

:::::: TO: Stephen Hemminger <stephen@networkplumber.org>
:::::: CC: David S. Miller <davem@davemloft.net>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35929 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread
* net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces)
@ 2020-08-11 17:10 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-11 17:10 UTC (permalink / raw)
  To: Luc Van Oostenryck; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4212 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date:   8 weeks ago
config: s390-randconfig-s032-20200811 (attached as .config)
compiler: s390-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.2-168-g9554805c-dirty
        git checkout 670d0a4b10704667765f7d18f7592993d02783aa
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=s390 

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


sparse warnings: (new ones prefixed by >>)

>> net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct tcp_congestion_ops const [noderef] __rcu * @@     got struct tcp_congestion_ops *[assigned] ca @@
>> net/ipv4/tcp_cong.c:228:24: sparse:     expected struct tcp_congestion_ops const [noderef] __rcu *
   net/ipv4/tcp_cong.c:228:24: sparse:     got struct tcp_congestion_ops *[assigned] ca
   net/ipv4/tcp_cong.c:228:22: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct tcp_congestion_ops const *prev @@     got struct tcp_congestion_ops const [noderef] __rcu *[assigned] __old @@
   net/ipv4/tcp_cong.c:228:22: sparse:     expected struct tcp_congestion_ops const *prev
   net/ipv4/tcp_cong.c:228:22: sparse:     got struct tcp_congestion_ops const [noderef] __rcu *[assigned] __old

vim +228 net/ipv4/tcp_cong.c

317a76f9a44b437 Stephen Hemminger 2005-06-23  213  
317a76f9a44b437 Stephen Hemminger 2005-06-23  214  /* Used by sysctl to change default congestion control */
6670e152447732b Stephen Hemminger 2017-11-14  215  int tcp_set_default_congestion_control(struct net *net, const char *name)
317a76f9a44b437 Stephen Hemminger 2005-06-23  216  {
317a76f9a44b437 Stephen Hemminger 2005-06-23  217  	struct tcp_congestion_ops *ca;
6670e152447732b Stephen Hemminger 2017-11-14  218  	const struct tcp_congestion_ops *prev;
6670e152447732b Stephen Hemminger 2017-11-14  219  	int ret;
317a76f9a44b437 Stephen Hemminger 2005-06-23  220  
6670e152447732b Stephen Hemminger 2017-11-14  221  	rcu_read_lock();
6670e152447732b Stephen Hemminger 2017-11-14  222  	ca = tcp_ca_find_autoload(net, name);
6670e152447732b Stephen Hemminger 2017-11-14  223  	if (!ca) {
6670e152447732b Stephen Hemminger 2017-11-14  224  		ret = -ENOENT;
0baf26b0fcd74bb Martin KaFai Lau  2020-01-08  225  	} else if (!bpf_try_module_get(ca, ca->owner)) {
6670e152447732b Stephen Hemminger 2017-11-14  226  		ret = -EBUSY;
6670e152447732b Stephen Hemminger 2017-11-14  227  	} else {
6670e152447732b Stephen Hemminger 2017-11-14 @228  		prev = xchg(&net->ipv4.tcp_congestion_control, ca);
6670e152447732b Stephen Hemminger 2017-11-14  229  		if (prev)
0baf26b0fcd74bb Martin KaFai Lau  2020-01-08  230  			bpf_module_put(prev, prev->owner);
317a76f9a44b437 Stephen Hemminger 2005-06-23  231  
6670e152447732b Stephen Hemminger 2017-11-14  232  		ca->flags |= TCP_CONG_NON_RESTRICTED;
317a76f9a44b437 Stephen Hemminger 2005-06-23  233  		ret = 0;
317a76f9a44b437 Stephen Hemminger 2005-06-23  234  	}
6670e152447732b Stephen Hemminger 2017-11-14  235  	rcu_read_unlock();
317a76f9a44b437 Stephen Hemminger 2005-06-23  236  
317a76f9a44b437 Stephen Hemminger 2005-06-23  237  	return ret;
317a76f9a44b437 Stephen Hemminger 2005-06-23  238  }
317a76f9a44b437 Stephen Hemminger 2005-06-23  239  

:::::: The code at line 228 was first introduced by commit
:::::: 6670e152447732ba90626f36dfc015a13fbf150e tcp: Namespace-ify sysctl_tcp_default_congestion_control

:::::: TO: Stephen Hemminger <stephen@networkplumber.org>
:::::: CC: David S. Miller <davem@davemloft.net>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 35929 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-16  9:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-16  9:35 net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces) kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2020-08-11 17:10 kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®