summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2014-02-14 11:42:36 +0100
committerJesse Gross <jesse@nicira.com>2014-02-15 17:24:19 -0800
commit3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210 (patch)
tree4f3f5fcfe09e70e605ff4d14eaeba3f9136550b4 /net/openvswitch/datapath.c
parentc14e0953ca51dbcb8d1ac92acbdcff23d0caa158 (diff)
downloadop-kernel-dev-3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210.zip
op-kernel-dev-3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210.tar.gz
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/datapath.c')
-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 e9a48ba..e42340d 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
struct datapath *dp;
dp = lookup_datapath(sock_net(skb->sk), info->userhdr, info->attrs);
- if (!dp)
+ if (IS_ERR(dp))
return;
WARN(dp->user_features, "Dropping previously announced user features\n");
OpenPOWER on IntegriCloud