mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 12:56:45 +07:00
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 44da5ae5fb
"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>
This commit is contained in:
parent
c14e0953ca
commit
3c7eacfc8a
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user