Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH net-next 2/2] openvswitch: Support conntrack zone limit (fwd)
@ 2018-04-17  4:49 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2018-04-17  4:49 UTC (permalink / raw)
  To: Yi-Hung Wei; +Cc: netdev, kbuild-all

Line 1814 frees something that is dereferenced on the next line.

julia

---------- Forwarded message ----------
Date: Tue, 17 Apr 2018 10:32:17 +0800
From: kbuild test robot <lkp@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH net-next 2/2] openvswitch: Support conntrack zone limit

CC: kbuild-all@01.org
In-Reply-To: <1523902550-10767-3-git-send-email-yihung.wei@gmail.com>
References: <1523902550-10767-3-git-send-email-yihung.wei@gmail.com>
TO: Yi-Hung Wei <yihung.wei@gmail.com>
CC: netdev@vger.kernel.org
CC: Yi-Hung Wei <yihung.wei@gmail.com>

Hi Yi-Hung,

Thank you for the patch! Perhaps something to improve:

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

url:    https://github.com/0day-ci/linux/commits/Yi-Hung-Wei/openvswitch-Support-conntrack-zone-limit/20180417-085035
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

>> net/openvswitch/conntrack.c:1815:17-39: ERROR: reference preceded by free on line 1814

# https://github.com/0day-ci/linux/commit/01487f05f032565b952e344abace672a12045d9e
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 01487f05f032565b952e344abace672a12045d9e
vim +1815 net/openvswitch/conntrack.c

c2ac6673 Joe Stringer 2015-08-26  1786
01487f05 Yi-Hung Wei  2018-04-16  1787  #if	IS_ENABLED(CONFIG_NETFILTER_CONNCOUNT)
01487f05 Yi-Hung Wei  2018-04-16  1788  static int ovs_ct_limit_init(struct net *net, struct ovs_net *ovs_net)
01487f05 Yi-Hung Wei  2018-04-16  1789  {
01487f05 Yi-Hung Wei  2018-04-16  1790  	int i;
01487f05 Yi-Hung Wei  2018-04-16  1791
01487f05 Yi-Hung Wei  2018-04-16  1792  	ovs_net->ct_limit_info = kmalloc(sizeof *ovs_net->ct_limit_info,
01487f05 Yi-Hung Wei  2018-04-16  1793  					 GFP_KERNEL);
01487f05 Yi-Hung Wei  2018-04-16  1794  	if (!ovs_net->ct_limit_info)
01487f05 Yi-Hung Wei  2018-04-16  1795  		return -ENOMEM;
01487f05 Yi-Hung Wei  2018-04-16  1796
01487f05 Yi-Hung Wei  2018-04-16  1797  	ovs_net->ct_limit_info->default_limit = OVS_CT_LIMIT_DEFAULT;
01487f05 Yi-Hung Wei  2018-04-16  1798  	ovs_net->ct_limit_info->limits =
01487f05 Yi-Hung Wei  2018-04-16  1799  		kmalloc_array(CT_LIMIT_HASH_BUCKETS, sizeof(struct hlist_head),
01487f05 Yi-Hung Wei  2018-04-16  1800  			      GFP_KERNEL);
01487f05 Yi-Hung Wei  2018-04-16  1801  	if (!ovs_net->ct_limit_info->limits) {
01487f05 Yi-Hung Wei  2018-04-16  1802  		kfree(ovs_net->ct_limit_info);
01487f05 Yi-Hung Wei  2018-04-16  1803  		return -ENOMEM;
01487f05 Yi-Hung Wei  2018-04-16  1804  	}
01487f05 Yi-Hung Wei  2018-04-16  1805
01487f05 Yi-Hung Wei  2018-04-16  1806  	for (i = 0; i < CT_LIMIT_HASH_BUCKETS; i++)
01487f05 Yi-Hung Wei  2018-04-16  1807  		INIT_HLIST_HEAD(&ovs_net->ct_limit_info->limits[i]);
01487f05 Yi-Hung Wei  2018-04-16  1808
01487f05 Yi-Hung Wei  2018-04-16  1809  	ovs_net->ct_limit_info->data =
01487f05 Yi-Hung Wei  2018-04-16  1810  		nf_conncount_init(net, NFPROTO_INET, sizeof(u32));
01487f05 Yi-Hung Wei  2018-04-16  1811
01487f05 Yi-Hung Wei  2018-04-16  1812  	if (IS_ERR(ovs_net->ct_limit_info->data)) {
01487f05 Yi-Hung Wei  2018-04-16  1813  		kfree(ovs_net->ct_limit_info->limits);
01487f05 Yi-Hung Wei  2018-04-16 @1814  		kfree(ovs_net->ct_limit_info);
01487f05 Yi-Hung Wei  2018-04-16 @1815  		return PTR_ERR(ovs_net->ct_limit_info->data);
01487f05 Yi-Hung Wei  2018-04-16  1816  	}
01487f05 Yi-Hung Wei  2018-04-16  1817  	return 0;
01487f05 Yi-Hung Wei  2018-04-16  1818  }
01487f05 Yi-Hung Wei  2018-04-16  1819

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-17  4:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-17  4:49 [PATCH net-next 2/2] openvswitch: Support conntrack zone limit (fwd) Julia Lawall

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