Skip to content

Commit 79310c4

Browse files
hao022gregkh
authored andcommitted
net: openvswitch: don't unlock mutex when changing the user_features fails
[ Upstream commit 4c76bf6 ] 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: 95a7233 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 7c33278 commit 79310c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/openvswitch/datapath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1667,6 +1667,7 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
16671667
ovs_dp_reset_user_features(skb, info);
16681668
}
16691669

1670+
ovs_unlock();
16701671
goto err_destroy_meters;
16711672
}
16721673

@@ -1683,7 +1684,6 @@ static int ovs_dp_cmd_new(struct sk_buff *skb, struct genl_info *info)
16831684
return 0;
16841685

16851686
err_destroy_meters:
1686-
ovs_unlock();
16871687
ovs_meters_exit(dp);
16881688
err_destroy_ports_array:
16891689
kfree(dp->ports);

0 commit comments

Comments
 (0)