All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][net-next] openvswitch: remove BUG_ON from get_dpdev
@ 2018-11-08 12:40 Li RongQing
  2018-11-09  1:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Li RongQing @ 2018-11-08 12:40 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, pshelar-LZ6Gd1LRuIk,
	dev-yBygre7rU0TnMu66kgdUjQ

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-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
---
 net/openvswitch/vport-netdev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c
index 2e5e7a41d8ef..9bec22e3e9e8 100644
--- a/net/openvswitch/vport-netdev.c
+++ b/net/openvswitch/vport-netdev.c
@@ -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;
 }
 
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH][net-next] openvswitch: remove BUG_ON from get_dpdev
  2018-11-08 12:40 [PATCH][net-next] openvswitch: remove BUG_ON from get_dpdev Li RongQing
@ 2018-11-09  1:15 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-09  1:15 UTC (permalink / raw)
  To: lirongqing; +Cc: netdev, pshelar, dev

From: Li RongQing <lirongqing@baidu.com>
Date: Thu,  8 Nov 2018 20:40:20 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-09 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 12:40 [PATCH][net-next] openvswitch: remove BUG_ON from get_dpdev Li RongQing
2018-11-09  1:15 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.