aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-02-14 05:42:36 -0500
committerJesse Gross <jesse@nicira.com>2014-02-15 20:24:19 -0500
commit3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210 (patch)
tree4f3f5fcfe09e70e605ff4d14eaeba3f9136550b4 /net/openvswitch
parentc14e0953ca51dbcb8d1ac92acbdcff23d0caa158 (diff)
ovs: fix dp check in ovs_dp_reset_user_features
This fixes crash when userspace does "ovs-dpctl add-dp dev" where dev is existing non-dp netdevice. Introduced by: commit 44da5ae5fbea4686f667dc854e5ea16814e44c59 "openvswitch: Drop user features if old user space attempted to create datapath" Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/datapath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index e9a48baf8551..e42340d3f820 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");