CC: kbuild-all(a)lists.01.org In-Reply-To: <20210430153325.28322-1-mark.d.gray@redhat.com> References: <20210430153325.28322-1-mark.d.gray@redhat.com> TO: Mark Gray Hi Mark, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Mark-Gray/openvswitch-Introduce-per-cpu-upcall-dispatch/20210430-233534 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 4a52dd8fefb45626dace70a63c0738dbd83b7edb :::::: branch date: 4 hours ago :::::: commit date: 4 hours ago config: i386-randconfig-m021-20210430 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: net/openvswitch/datapath.c:1612 ovs_dp_set_upcall_portids() warn: variable dereferenced before check 'dp' (see line 1608) net/openvswitch/datapath.c:1613 ovs_dp_set_upcall_portids() warn: possible memory leak of 'dp_portids' vim +/dp +1612 net/openvswitch/datapath.c 95a7233c452a58 Paul Blakey 2019-09-04 1599 96349cd061e4c2 Mark Gray 2021-04-30 1600 static int ovs_dp_set_upcall_portids(struct datapath *dp, 96349cd061e4c2 Mark Gray 2021-04-30 1601 const struct nlattr *ids) 96349cd061e4c2 Mark Gray 2021-04-30 1602 { 96349cd061e4c2 Mark Gray 2021-04-30 1603 struct dp_portids *old, *dp_portids; 96349cd061e4c2 Mark Gray 2021-04-30 1604 96349cd061e4c2 Mark Gray 2021-04-30 1605 if (!nla_len(ids) || nla_len(ids) % sizeof(u32)) 96349cd061e4c2 Mark Gray 2021-04-30 1606 return -EINVAL; 96349cd061e4c2 Mark Gray 2021-04-30 1607 96349cd061e4c2 Mark Gray 2021-04-30 @1608 old = ovsl_dereference(dp->upcall_portids); 96349cd061e4c2 Mark Gray 2021-04-30 1609 96349cd061e4c2 Mark Gray 2021-04-30 1610 dp_portids = kmalloc(sizeof(*dp_portids) + nla_len(ids), 96349cd061e4c2 Mark Gray 2021-04-30 1611 GFP_KERNEL); 96349cd061e4c2 Mark Gray 2021-04-30 @1612 if (!dp) 96349cd061e4c2 Mark Gray 2021-04-30 @1613 return -ENOMEM; 96349cd061e4c2 Mark Gray 2021-04-30 1614 96349cd061e4c2 Mark Gray 2021-04-30 1615 dp_portids->n_ids = nla_len(ids) / sizeof(u32); 96349cd061e4c2 Mark Gray 2021-04-30 1616 nla_memcpy(dp_portids->ids, ids, nla_len(ids)); 96349cd061e4c2 Mark Gray 2021-04-30 1617 96349cd061e4c2 Mark Gray 2021-04-30 1618 rcu_assign_pointer(dp->upcall_portids, dp_portids); 96349cd061e4c2 Mark Gray 2021-04-30 1619 96349cd061e4c2 Mark Gray 2021-04-30 1620 if (old) 96349cd061e4c2 Mark Gray 2021-04-30 1621 kfree_rcu(old, rcu); 96349cd061e4c2 Mark Gray 2021-04-30 1622 return 0; 96349cd061e4c2 Mark Gray 2021-04-30 1623 } 96349cd061e4c2 Mark Gray 2021-04-30 1624 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org