diff options
author | Tonghao Zhang <xiangxia.m.yue@gmail.com> | 2019-11-01 17:23:53 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-04 04:18:04 +0300 |
commit | 4c76bf696a608ea5cc555fe97ec59a9033236604 (patch) | |
tree | f7d5dd77dc5c344362c854fa54a53a5e7d8f1c9f /net/openvswitch/datapath.c | |
parent | 50b0e61b32ee890a75b4377d5fbe770a86d6a4c1 (diff) | |
download | linux-4c76bf696a608ea5cc555fe97ec59a9033236604.tar.xz |
net: openvswitch: don't unlock mutex when changing the user_features fails
Unlocking of a not locked mutex is not allowed.
Other kernel thread may be in critical section while
we unlock it because of setting user_feature fail.
Fixes: 95a7233c4 ("net: openvswitch: Set OvS recirc_id from tc chain index")
Cc: Paul Blakey <paulb@mellanox.com>
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Tested-by: Greg Rose <gvrose8192@gmail.com>
Acked-by: William Tu <u9012063@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 24cb73e62f55..745033e261aa 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -1657,6 +1657,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) ovs_dp_reset_user_features(skb, info); } + ovs_unlock(); goto err_destroy_meters; } @@ -1673,7 +1674,6 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info) return 0; err_destroy_meters: - ovs_unlock(); ovs_meters_exit(dp); err_destroy_ports_array: kfree(dp->ports); |