Hi Adrian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    
https://github.com/intel-lab-lkp/linux/commits/Adrian-Moreno/net-openvswitch-decouple-flow_table-from-ovs_mutex/20260314-152511
base:   net-next/main
patch link:    
https://lore.kernel.org/r/20260313173114.1220551-1-amorenoz%40redhat.com
patch subject: [PATCH net-next v1] net: openvswitch: decouple flow_table from 
ovs_mutex
config: arm-randconfig-r132-20260317 
(https://download.01.org/0day-ci/archive/20260317/[email protected]/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 
f46a5153850c1303d687233d4adf699b01041da8)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20260317/[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/openvswitch/datapath.c:2016:28: sparse: sparse: incorrect type in 
>> argument 1 (different address spaces) @@     expected struct flow_table 
>> *table @@     got struct flow_table [noderef] __rcu *table @@
   net/openvswitch/datapath.c:2016:28: sparse:     expected struct flow_table 
*table
   net/openvswitch/datapath.c:2016:28: sparse:     got struct flow_table 
[noderef] __rcu *table

vim +2016 net/openvswitch/datapath.c

  1913  
  1914  static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
  1915  {
  1916          struct nlattr **a = info->attrs;
  1917          struct flow_table *table;
  1918          struct vport_parms parms;
  1919          struct sk_buff *reply;
  1920          struct datapath *dp;
  1921          struct vport *vport;
  1922          struct ovs_net *ovs_net;
  1923          int err;
  1924  
  1925          err = -EINVAL;
  1926          if (!a[OVS_DP_ATTR_NAME] || !a[OVS_DP_ATTR_UPCALL_PID])
  1927                  goto err;
  1928  
  1929          reply = ovs_dp_cmd_alloc_info();
  1930          if (!reply)
  1931                  return -ENOMEM;
  1932  
  1933          err = -ENOMEM;
  1934          dp = kzalloc_obj(*dp);
  1935          if (dp == NULL)
  1936                  goto err_destroy_reply;
  1937  
  1938          ovs_dp_set_net(dp, sock_net(skb->sk));
  1939  
  1940          /* Allocate table. */
  1941          table = ovs_flow_tbl_alloc();
  1942          if (IS_ERR(table)) {
  1943                  err = PTR_ERR(table);
  1944                  goto err_destroy_dp;
  1945          }
  1946          rcu_assign_pointer(dp->table, table);
  1947  
  1948          err = ovs_dp_stats_init(dp);
  1949          if (err)
  1950                  goto err_destroy_table;
  1951  
  1952          err = ovs_dp_vport_init(dp);
  1953          if (err)
  1954                  goto err_destroy_stats;
  1955  
  1956          err = ovs_meters_init(dp);
  1957          if (err)
  1958                  goto err_destroy_ports;
  1959  
  1960          /* Set up our datapath device. */
  1961          parms.name = nla_data(a[OVS_DP_ATTR_NAME]);
  1962          parms.type = OVS_VPORT_TYPE_INTERNAL;
  1963          parms.options = NULL;
  1964          parms.dp = dp;
  1965          parms.port_no = OVSP_LOCAL;
  1966          parms.upcall_portids = a[OVS_DP_ATTR_UPCALL_PID];
  1967          parms.desired_ifindex = 
nla_get_s32_default(a[OVS_DP_ATTR_IFINDEX], 0);
  1968  
  1969          /* So far only local changes have been made, now need the lock. 
*/
  1970          ovs_lock();
  1971  
  1972          err = ovs_dp_change(dp, a);
  1973          if (err)
  1974                  goto err_unlock_and_destroy_meters;
  1975  
  1976          vport = new_vport(&parms);
  1977          if (IS_ERR(vport)) {
  1978                  err = PTR_ERR(vport);
  1979                  if (err == -EBUSY)
  1980                          err = -EEXIST;
  1981  
  1982                  if (err == -EEXIST) {
  1983                          /* An outdated user space instance that does 
not understand
  1984                           * the concept of user_features has attempted 
to create a new
  1985                           * datapath and is likely to reuse it. Drop all 
user features.
  1986                           */
  1987                          if (info->genlhdr->version < 
OVS_DP_VER_FEATURES)
  1988                                  ovs_dp_reset_user_features(skb, info);
  1989                  }
  1990  
  1991                  goto err_destroy_portids;
  1992          }
  1993  
  1994          err = ovs_dp_cmd_fill_info(dp, reply, info->snd_portid,
  1995                                     info->snd_seq, 0, OVS_DP_CMD_NEW);
  1996          BUG_ON(err < 0);
  1997  
  1998          ovs_net = net_generic(ovs_dp_get_net(dp), ovs_net_id);
  1999          list_add_tail_rcu(&dp->list_node, &ovs_net->dps);
  2000  
  2001          ovs_unlock();
  2002  
  2003          ovs_notify(&dp_datapath_genl_family, reply, info);
  2004          return 0;
  2005  
  2006  err_destroy_portids:
  2007          kfree(rcu_dereference_raw(dp->upcall_portids));
  2008  err_unlock_and_destroy_meters:
  2009          ovs_unlock();
  2010          ovs_meters_exit(dp);
  2011  err_destroy_ports:
  2012          kfree(dp->ports);
  2013  err_destroy_stats:
  2014          free_percpu(dp->stats_percpu);
  2015  err_destroy_table:
> 2016          ovs_flow_tbl_put(dp->table);
  2017  err_destroy_dp:
  2018          kfree(dp);
  2019  err_destroy_reply:
  2020          kfree_skb(reply);
  2021  err:
  2022          return err;
  2023  }
  2024  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to