Skip to content

Commit

Permalink
openvswitch: remove BUG_ON from get_dpdev
Browse files Browse the repository at this point in the history
if local is NULL pointer, and the following access of local's
dev will trigger panic, which is same as BUG_ON

Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li RongQing authored and David S. Miller committed Nov 9, 2018

Unverified

No user is associated with the committer email.
1 parent 20da4ef commit 04087d9
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/openvswitch/vport-netdev.c
Original file line number Diff line number Diff line change
@@ -84,7 +84,6 @@ static struct net_device *get_dpdev(const struct datapath *dp)
struct vport *local;

local = ovs_vport_ovsl(dp, OVSP_LOCAL);
BUG_ON(!local);
return local->dev;
}

0 comments on commit 04087d9

Please sign in to comment.