提交 3c7eacfc 编写于 作者: J Jiri Pirko 提交者: Jesse Gross

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 44da5ae5
"openvswitch: Drop user features if old user space attempted to create datapath"
Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NJesse Gross <jesse@nicira.com>
上级 c14e0953
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册