[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1804170648090.2381@hadrien>
Date: Tue, 17 Apr 2018 06:49:19 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Yi-Hung Wei <yihung.wei@...il.com>
cc: netdev@...r.kernel.org, kbuild-all@...org
Subject: Re: [PATCH net-next 2/2] openvswitch: Support conntrack zone limit
(fwd)
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@...el.com>
To: kbuild@...org
Cc: Julia Lawall <julia.lawall@...6.fr>
Subject: Re: [PATCH net-next 2/2] openvswitch: Support conntrack zone limit
CC: kbuild-all@...org
In-Reply-To: <1523902550-10767-3-git-send-email-yihung.wei@...il.com>
References: <1523902550-10767-3-git-send-email-yihung.wei@...il.com>
TO: Yi-Hung Wei <yihung.wei@...il.com>
CC: netdev@...r.kernel.org
CC: Yi-Hung Wei <yihung.wei@...il.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
Powered by blists - more mailing lists