Re: [PATCH net-next,v4 01/12] flow_offload: add flow_rule and flow_match structures and use them (fwd)

From: Julia Lawall <hidden>
Date: 2018-12-01 18:43:42

Hello,

It looks like the kfree on line 1573 should be moved down a few lines.

julia

---------- Forwarded message ----------
Date: Sat, 1 Dec 2018 11:11:55 +0800
From: kbuild test robot <redacted>
To: kbuild@01.org
Cc: Julia Lawall <redacted>
Subject: Re: [PATCH net-next,
    v4 01/12] flow_offload: add flow_rule and flow_match structures and use them

CC: kbuild-all@01.org
In-Reply-To: [ref]
References: [ref]
TO: Pablo Neira Ayuso <pablo@netfilter.org>
CC: netdev@vger.kernel.org

Hi Pablo,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]
[also build test WARNING on next-20181130]
[cannot apply to v4.20-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/add-flow_rule-infrastructure/20181130-204709
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
quoted
net/sched/cls_flower.c:1586:7-9: ERROR: reference preceded by free on line 1573
# https://github.com/0day-ci/linux/commit/012ba7afb48db31be34a84d5fe82c4ceb409fd2d
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 012ba7afb48db31be34a84d5fe82c4ceb409fd2d
vim +1586 net/sched/cls_flower.c

34738452 Jiri Pirko        2018-07-23  1544
b95ec7eb Jiri Pirko        2018-07-23  1545  static void *fl_tmplt_create(struct net *net, struct tcf_chain *chain,
b95ec7eb Jiri Pirko        2018-07-23  1546  			     struct nlattr **tca,
b95ec7eb Jiri Pirko        2018-07-23  1547  			     struct netlink_ext_ack *extack)
b95ec7eb Jiri Pirko        2018-07-23  1548  {
b95ec7eb Jiri Pirko        2018-07-23  1549  	struct fl_flow_tmplt *tmplt;
b95ec7eb Jiri Pirko        2018-07-23  1550  	struct nlattr **tb;
b95ec7eb Jiri Pirko        2018-07-23  1551  	int err;
b95ec7eb Jiri Pirko        2018-07-23  1552
b95ec7eb Jiri Pirko        2018-07-23  1553  	if (!tca[TCA_OPTIONS])
b95ec7eb Jiri Pirko        2018-07-23  1554  		return ERR_PTR(-EINVAL);
b95ec7eb Jiri Pirko        2018-07-23  1555
b95ec7eb Jiri Pirko        2018-07-23  1556  	tb = kcalloc(TCA_FLOWER_MAX + 1, sizeof(struct nlattr *), GFP_KERNEL);
b95ec7eb Jiri Pirko        2018-07-23  1557  	if (!tb)
b95ec7eb Jiri Pirko        2018-07-23  1558  		return ERR_PTR(-ENOBUFS);
b95ec7eb Jiri Pirko        2018-07-23  1559  	err = nla_parse_nested(tb, TCA_FLOWER_MAX, tca[TCA_OPTIONS],
b95ec7eb Jiri Pirko        2018-07-23  1560  			       fl_policy, NULL);
b95ec7eb Jiri Pirko        2018-07-23  1561  	if (err)
b95ec7eb Jiri Pirko        2018-07-23  1562  		goto errout_tb;
b95ec7eb Jiri Pirko        2018-07-23  1563
b95ec7eb Jiri Pirko        2018-07-23  1564  	tmplt = kzalloc(sizeof(*tmplt), GFP_KERNEL);
1cbc36a5 Dan Carpenter     2018-08-03  1565  	if (!tmplt) {
1cbc36a5 Dan Carpenter     2018-08-03  1566  		err = -ENOMEM;
b95ec7eb Jiri Pirko        2018-07-23  1567  		goto errout_tb;
1cbc36a5 Dan Carpenter     2018-08-03  1568  	}
b95ec7eb Jiri Pirko        2018-07-23  1569  	tmplt->chain = chain;
b95ec7eb Jiri Pirko        2018-07-23  1570  	err = fl_set_key(net, tb, &tmplt->dummy_key, &tmplt->mask, extack);
b95ec7eb Jiri Pirko        2018-07-23  1571  	if (err)
b95ec7eb Jiri Pirko        2018-07-23  1572  		goto errout_tmplt;
b95ec7eb Jiri Pirko        2018-07-23 @1573  	kfree(tb);
b95ec7eb Jiri Pirko        2018-07-23  1574
b95ec7eb Jiri Pirko        2018-07-23  1575  	fl_init_dissector(&tmplt->dissector, &tmplt->mask);
b95ec7eb Jiri Pirko        2018-07-23  1576
012ba7af Pablo Neira Ayuso 2018-11-29  1577  	err = fl_hw_create_tmplt(chain, tmplt);
012ba7af Pablo Neira Ayuso 2018-11-29  1578  	if (err)
012ba7af Pablo Neira Ayuso 2018-11-29  1579  		goto errout_tmplt;
34738452 Jiri Pirko        2018-07-23  1580
b95ec7eb Jiri Pirko        2018-07-23  1581  	return tmplt;
b95ec7eb Jiri Pirko        2018-07-23  1582
b95ec7eb Jiri Pirko        2018-07-23  1583  errout_tmplt:
b95ec7eb Jiri Pirko        2018-07-23  1584  	kfree(tmplt);
b95ec7eb Jiri Pirko        2018-07-23  1585  errout_tb:
b95ec7eb Jiri Pirko        2018-07-23 @1586  	kfree(tb);
b95ec7eb Jiri Pirko        2018-07-23  1587  	return ERR_PTR(err);
b95ec7eb Jiri Pirko        2018-07-23  1588  }
b95ec7eb Jiri Pirko        2018-07-23  1589

:::::: The code at line 1586 was first introduced by commit
:::::: b95ec7eb3b4d2f158dd15c912cf670b546f09571 net: sched: cls_flower: implement chain templates

:::::: TO: Jiri Pirko [off-list ref]
:::::: CC: David S. Miller [off-list ref]

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help