From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF8C0C4167B for ; Mon, 4 Dec 2023 12:03:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232868AbjLDMDp (ORCPT ); Mon, 4 Dec 2023 07:03:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232347AbjLDMD3 (ORCPT ); Mon, 4 Dec 2023 07:03:29 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D50261FC3 for ; Mon, 4 Dec 2023 04:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701691373; x=1733227373; h=date:from:to:cc:subject:message-id:mime-version; bh=89GACn/arX/JrxwPM0BPJdLmhfMyAEIrs1vDiwO02oY=; b=hd4wCfNTmwnwEAb6JgQWavVT/8rg4E//MDqbkzzcKMYwUO96LalyW1qv wK/SpskYoPCXjyTT1FiynpSRrrDZTO9G/1YeOOpwMBN+bYxVary27OeP5 WPhCWOSMJ8qXqGVc6JKOxVTx9HSlKZcdtYNrjB0HrDwD+PXSNwKd53qD1 cRc7Ppl4qUcOcMwiCNXwl1DqVQuZNoj+Ce9xkbiub8n8iyJFcIlK51lPu Y3x+LzQDD3kFDL7qtN6mHOg179Ed0EYajAAJ4YICX36rPWrANkdI7SSva IAsZ7ds9MA/57qFy1OIi3KkoC1Tra2PSWvaourwobstsxk6zoGltLLDQ/ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10913"; a="620870" X-IronPort-AV: E=Sophos;i="6.04,249,1695711600"; d="scan'208";a="620870" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 04:02:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10913"; a="770515226" X-IronPort-AV: E=Sophos;i="6.04,249,1695711600"; d="scan'208";a="770515226" Received: from lkp-server02.sh.intel.com (HELO b07ab15da5fe) ([10.239.97.151]) by orsmga002.jf.intel.com with ESMTP; 04 Dec 2023 04:02:50 -0800 Received: from kbuild by b07ab15da5fe with local (Exim 4.96) (envelope-from ) id 1rA7ey-0007hy-1E; Mon, 04 Dec 2023 12:02:48 +0000 Date: Mon, 4 Dec 2023 20:02:34 +0800 From: kernel test robot To: Vineet Gupta Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org Subject: net/ipv4/tcp_cong.c:238:24: sparse: sparse: incorrect type in initializer (different address spaces) Message-ID: <202312041926.tEYYQdAT-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 33cc938e65a98f1d29d0a18403dbbee050dcad9a commit: e188f3330a13df904d77003846eafd3edf99009d ARC: cmpxchg/xchg: rewrite as macros to make type safe date: 2 years, 3 months ago config: arc-randconfig-r123-20231117 (https://download.01.org/0day-ci/archive/20231204/202312041926.tEYYQdAT-lkp@intel.com/config) compiler: arceb-elf-gcc (GCC) 13.2.0 reproduce: (https://download.01.org/0day-ci/archive/20231204/202312041926.tEYYQdAT-lkp@intel.com/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 | Closes: https://lore.kernel.org/oe-kbuild-all/202312041926.tEYYQdAT-lkp@intel.com/ sparse warnings: (new ones prefixed by >>) >> net/ipv4/tcp_cong.c:238:24: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct tcp_congestion_ops const [noderef] __rcu *_val_ @@ got struct tcp_congestion_ops *[assigned] ca @@ net/ipv4/tcp_cong.c:238:24: sparse: expected struct tcp_congestion_ops const [noderef] __rcu *_val_ net/ipv4/tcp_cong.c:238:24: sparse: got struct tcp_congestion_ops *[assigned] ca net/ipv4/tcp_cong.c:238: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] _val_ @@ net/ipv4/tcp_cong.c:238:22: sparse: expected struct tcp_congestion_ops const *prev net/ipv4/tcp_cong.c:238:22: sparse: got struct tcp_congestion_ops const [noderef] __rcu *[assigned] _val_ vim +238 net/ipv4/tcp_cong.c 317a76f9a44b43 Stephen Hemminger 2005-06-23 219 317a76f9a44b43 Stephen Hemminger 2005-06-23 220 /* Used by sysctl to change default congestion control */ 6670e152447732 Stephen Hemminger 2017-11-14 221 int tcp_set_default_congestion_control(struct net *net, const char *name) 317a76f9a44b43 Stephen Hemminger 2005-06-23 222 { 317a76f9a44b43 Stephen Hemminger 2005-06-23 223 struct tcp_congestion_ops *ca; 6670e152447732 Stephen Hemminger 2017-11-14 224 const struct tcp_congestion_ops *prev; 6670e152447732 Stephen Hemminger 2017-11-14 225 int ret; 317a76f9a44b43 Stephen Hemminger 2005-06-23 226 6670e152447732 Stephen Hemminger 2017-11-14 227 rcu_read_lock(); 6670e152447732 Stephen Hemminger 2017-11-14 228 ca = tcp_ca_find_autoload(net, name); 6670e152447732 Stephen Hemminger 2017-11-14 229 if (!ca) { 6670e152447732 Stephen Hemminger 2017-11-14 230 ret = -ENOENT; 0baf26b0fcd74b Martin KaFai Lau 2020-01-08 231 } else if (!bpf_try_module_get(ca, ca->owner)) { 6670e152447732 Stephen Hemminger 2017-11-14 232 ret = -EBUSY; 8d432592f30fcc Jonathon Reinhart 2021-05-01 233 } else if (!net_eq(net, &init_net) && 8d432592f30fcc Jonathon Reinhart 2021-05-01 234 !(ca->flags & TCP_CONG_NON_RESTRICTED)) { 8d432592f30fcc Jonathon Reinhart 2021-05-01 235 /* Only init netns can set default to a restricted algorithm */ 8d432592f30fcc Jonathon Reinhart 2021-05-01 236 ret = -EPERM; 6670e152447732 Stephen Hemminger 2017-11-14 237 } else { 6670e152447732 Stephen Hemminger 2017-11-14 @238 prev = xchg(&net->ipv4.tcp_congestion_control, ca); 6670e152447732 Stephen Hemminger 2017-11-14 239 if (prev) 0baf26b0fcd74b Martin KaFai Lau 2020-01-08 240 bpf_module_put(prev, prev->owner); 317a76f9a44b43 Stephen Hemminger 2005-06-23 241 6670e152447732 Stephen Hemminger 2017-11-14 242 ca->flags |= TCP_CONG_NON_RESTRICTED; 317a76f9a44b43 Stephen Hemminger 2005-06-23 243 ret = 0; 317a76f9a44b43 Stephen Hemminger 2005-06-23 244 } 6670e152447732 Stephen Hemminger 2017-11-14 245 rcu_read_unlock(); 317a76f9a44b43 Stephen Hemminger 2005-06-23 246 317a76f9a44b43 Stephen Hemminger 2005-06-23 247 return ret; 317a76f9a44b43 Stephen Hemminger 2005-06-23 248 } 317a76f9a44b43 Stephen Hemminger 2005-06-23 249 :::::: The code at line 238 was first introduced by commit :::::: 6670e152447732ba90626f36dfc015a13fbf150e tcp: Namespace-ify sysctl_tcp_default_congestion_control :::::: TO: Stephen Hemminger :::::: CC: David S. Miller -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki