[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANr6G5zNyGsx590AqAjYmYeXu0bktnqzO0d-=Yh2_u+iq=LCww@mail.gmail.com>
Date: Mon, 13 Jul 2015 15:55:10 -0700
From: Joe Stringer <joestringer@...ira.com>
To: Thomas Graf <tgraf@...g.ch>
Cc: roopa@...ulusnetworks.com, rshearma@...cade.com,
ebiederm@...ssion.com, hannes@...essinduktion.org,
Pravin Shelar <pshelar@...ira.com>,
Jesse Gross <jesse@...ira.com>,
David Miller <davem@...emloft.net>, daniel@...earbox.net,
tom@...bertland.com, edumazet@...gle.com, jiri@...nulli.us,
marcelo.leitner@...il.com, stephen@...workplumber.org,
Justin Pettit <jpettit@...ira.com>,
Patrick McHardy <kaber@...sh.net>,
Linux Netdev List <netdev@...r.kernel.org>,
"dev@...nvswitch.org" <dev@...nvswitch.org>
Subject: Re: [RFC net-next 18/22] openvswitch: Make tunnel set action attach a
metadata dst
Hi Thomas,
On 10 July 2015 at 07:19, Thomas Graf <tgraf@...g.ch> wrote:
> diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c
> index ecfa530..05fe46b 100644
> --- a/net/openvswitch/flow_netlink.c
> +++ b/net/openvswitch/flow_netlink.c
> @@ -1548,11 +1548,45 @@ static struct sw_flow_actions *nla_alloc_flow_actions(int size, bool log)
> return sfa;
> }
>
> +static void ovs_nla_free_set_action(const struct nlattr *a)
> +{
> + const struct nlattr *ovs_key = nla_data(a);
> + struct ovs_tunnel_info *ovs_tun;
> +
> + switch (nla_type(ovs_key)) {
> + case OVS_KEY_ATTR_TUNNEL_INFO:
> + ovs_tun = nla_data(ovs_key);
> + dst_release((struct dst_entry *)ovs_tun->tun_dst);
> + break;
> + }
> +}
> +
> +void ovs_nla_free_flow_actions(struct sw_flow_actions *sf_acts)
> +{
> + const struct nlattr *a;
> + int rem;
> +
> + nla_for_each_attr(a, sf_acts->actions, sf_acts->actions_len, rem) {
> + switch (nla_type(a)) {
> + case OVS_ACTION_ATTR_SET:
> + ovs_nla_free_set_action(a);
> + break;
> + }
> + }
> +
> + kfree(sf_acts);
> +}
It doesn't look like flow_free() is using this new function to
properly free the actions. Also, some of the error cases that hit this
code have sf_acts=NULL.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists