From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julia Lawall Subject: Re: [PATCH net-next 2/2] openvswitch: Support conntrack zone limit (fwd) Date: Tue, 17 Apr 2018 06:49:19 +0200 (CEST) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Cc: netdev@vger.kernel.org, kbuild-all@01.org To: Yi-Hung Wei Return-path: Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:41024 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbeDQEtV (ORCPT ); Tue, 17 Apr 2018 00:49:21 -0400 Sender: netdev-owner@vger.kernel.org List-ID: 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 To: kbuild@01.org Cc: Julia Lawall 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 CC: netdev@vger.kernel.org CC: Yi-Hung Wei 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