diff options
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r-- | net/openvswitch/datapath.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index e9a48baf8551..8601b320b443 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -1174,7 +1174,7 @@ static void ovs_dp_reset_user_features(struct sk_buff *skb, struct genl_info *in | |||
1174 | struct datapath *dp; | 1174 | struct datapath *dp; |
1175 | 1175 | ||
1176 | dp = lookup_datapath(sock_net(skb->sk), info->userhdr, info->attrs); | 1176 | dp = lookup_datapath(sock_net(skb->sk), info->userhdr, info->attrs); |
1177 | if (!dp) | 1177 | if (IS_ERR(dp)) |
1178 | return; | 1178 | return; |
1179 | 1179 | ||
1180 | WARN(dp->user_features, "Dropping previously announced user features\n"); | 1180 | WARN(dp->user_features, "Dropping previously announced user features\n"); |
@@ -1762,11 +1762,12 @@ static int ovs_vport_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb) | |||
1762 | int bucket = cb->args[0], skip = cb->args[1]; | 1762 | int bucket = cb->args[0], skip = cb->args[1]; |
1763 | int i, j = 0; | 1763 | int i, j = 0; |
1764 | 1764 | ||
1765 | rcu_read_lock(); | ||
1765 | dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex); | 1766 | dp = get_dp(sock_net(skb->sk), ovs_header->dp_ifindex); |
1766 | if (!dp) | 1767 | if (!dp) { |
1768 | rcu_read_unlock(); | ||
1767 | return -ENODEV; | 1769 | return -ENODEV; |
1768 | 1770 | } | |
1769 | rcu_read_lock(); | ||
1770 | for (i = bucket; i < DP_VPORT_HASH_BUCKETS; i++) { | 1771 | for (i = bucket; i < DP_VPORT_HASH_BUCKETS; i++) { |
1771 | struct vport *vport; | 1772 | struct vport *vport; |
1772 | 1773 | ||