diff options
author | Jiri Pirko <jiri@resnulli.us> | 2014-02-14 11:42:36 +0100 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2014-02-15 17:24:19 -0800 |
commit | 3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210 (patch) | |
tree | 4f3f5fcfe09e70e605ff4d14eaeba3f9136550b4 /net/openvswitch | |
parent | c14e0953ca51dbcb8d1ac92acbdcff23d0caa158 (diff) | |
download | linux-stable-3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210.tar.gz linux-stable-3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210.tar.bz2 linux-stable-3c7eacfc8a9a4c2bd48e0093c4f43cf69afd5210.zip |
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.c | 2 |
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 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"); |