diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-04-24 02:07:15 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-04-24 02:07:15 +0300 |
commit | 57eb13a9e8f5d45a95d64da2174528666240031d (patch) | |
tree | 71aa69d108c3050a132c1181cb9b4a9eb69ac04e /net/sched/act_tunnel_key.c | |
parent | 04bb1719c4de94700056241d4c0fe3c1413f5aff (diff) | |
parent | 96a938aa214e965d5b4a2f10443b29cad14289b9 (diff) | |
download | linux-57eb13a9e8f5d45a95d64da2174528666240031d.tar.xz |
Merge branch 'ib-chrome-platform-input-atmel-mx-ts-platform-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform into next
Sync up with chrome-platform to bring in changes to Atmel touch
controller.
Diffstat (limited to 'net/sched/act_tunnel_key.c')
-rw-r--r-- | net/sched/act_tunnel_key.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/sched/act_tunnel_key.c b/net/sched/act_tunnel_key.c index 0e23aac09ad6..1281ca463727 100644 --- a/net/sched/act_tunnel_key.c +++ b/net/sched/act_tunnel_key.c @@ -153,6 +153,7 @@ static int tunnel_key_init(struct net *net, struct nlattr *nla, metadata->u.tun_info.mode |= IP_TUNNEL_INFO_TX; break; default: + ret = -EINVAL; goto err_out; } @@ -207,11 +208,12 @@ static void tunnel_key_release(struct tc_action *a) struct tcf_tunnel_key_params *params; params = rcu_dereference_protected(t->params, 1); + if (params) { + if (params->tcft_action == TCA_TUNNEL_KEY_ACT_SET) + dst_release(¶ms->tcft_enc_metadata->dst); - if (params->tcft_action == TCA_TUNNEL_KEY_ACT_SET) - dst_release(¶ms->tcft_enc_metadata->dst); - - kfree_rcu(params, rcu); + kfree_rcu(params, rcu); + } } static int tunnel_key_dump_addresses(struct sk_buff *skb, |