public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org, kbuild-all@01.org,
	thomas.lendacky@amd.com, f.fainelli@gmail.com,
	ariel.elior@cavium.com, michael.chan@broadcom.com,
	santosh@chelsio.com, madalin.bucur@nxp.com,
	yisen.zhuang@huawei.com, salil.mehta@huawei.com,
	jeffrey.t.kirsher@intel.com, tariqt@mellanox.com,
	saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com,
	jakub.kicinski@netronome.com, peppe.cavallaro@st.com,
	grygorii.strashko@ti.com, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, alexandre.torgue@st.com,
	joabreu@synopsys.com, linux-net-drivers@solarflare.com,
	ganeshgr@chelsio.com, ogerlitz@mellanox.com,
	Manish.Chopra@cavium.com, marcelo.leitner@gmail.com
Subject: Re: [PATCH net-next,v4 01/12] flow_offload: add flow_rule and flow_match structures and use them (fwd)
Date: Sat, 1 Dec 2018 08:31:40 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1812010830170.2633@hadrien> (raw)

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 <lkp@intel.com>
To: kbuild@01.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
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: <20181129022231.2740-2-pablo@netfilter.org>
References: <20181129022231.2740-2-pablo@netfilter.org>
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

>> 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 <jiri@mellanox.com>
:::::: CC: David S. Miller <davem@davemloft.net>

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

                 reply	other threads:[~2018-12-01 18:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1812010830170.2633@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Manish.Chopra@cavium.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=ariel.elior@cavium.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=ganeshgr@chelsio.com \
    --cc=grygorii.strashko@ti.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jiri@mellanox.com \
    --cc=joabreu@synopsys.com \
    --cc=kbuild-all@01.org \
    --cc=linux-net-drivers@solarflare.com \
    --cc=madalin.bucur@nxp.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=pablo@netfilter.org \
    --cc=peppe.cavallaro@st.com \
    --cc=saeedm@mellanox.com \
    --cc=salil.mehta@huawei.com \
    --cc=santosh@chelsio.com \
    --cc=tariqt@mellanox.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox