netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] vxge: potential NULL dereference
@ 2010-09-10 11:54 Dan Carpenter
  2010-09-10 20:32 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2010-09-10 11:54 UTC (permalink / raw)
  To: Ramkrishna Vepa
  Cc: Sivakumar Subramani, Sreenivasa Honnur, Jon Mason,
	David S. Miller, netdev, kernel-janitors

At the start of the function we test whether the "vpath" is NULL but we
need another test here as well.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
This is a static checker bug, I'm not sure if we ever pass a NULL
pointer for "vpath".

diff --git a/drivers/net/vxge/vxge-traffic.c b/drivers/net/vxge/vxge-traffic.c
index cedf08f..1790748 100644
--- a/drivers/net/vxge/vxge-traffic.c
+++ b/drivers/net/vxge/vxge-traffic.c
@@ -2157,7 +2157,8 @@ out2:
 		(alarm_event == VXGE_HW_EVENT_UNKNOWN))
 		return VXGE_HW_OK;
 
-	__vxge_hw_device_handle_error(hldev, vpath->vp_id, alarm_event);
+	if (vpath)
+		__vxge_hw_device_handle_error(hldev, vpath->vp_id, alarm_event);
 
 	if (alarm_event == VXGE_HW_EVENT_SERR)
 		return VXGE_HW_ERR_CRITICAL;

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

end of thread, other threads:[~2010-09-10 21:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-10 11:54 [patch] vxge: potential NULL dereference Dan Carpenter
2010-09-10 20:32 ` David Miller
2010-09-10 21:12   ` Dan Carpenter
2010-09-10 21:32   ` Jon Mason
2010-09-10 21:40     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).