From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: net/ipv4/tcp_cong.c:228:24: sparse: sparse: incorrect type in argument 3 (different address spaces)
Date: Wed, 12 Aug 2020 01:10:07 +0800 [thread overview]
Message-ID: <202008120102.RQj0J7l3%lkp@intel.com> (raw)
[-- 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 --]
next reply other threads:[~2020-08-11 17:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-11 17:10 kernel test robot [this message]
2020-08-16 9:35 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=202008120102.RQj0J7l3%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
/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
all inboxes | Powered by JetHome®