From: Dan Carpenter <error27@gmail.com>
To: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Sivakumar Subramani <sivakumar.subramani@exar.com>,
Sreenivasa Honnur <sreenivasa.honnur@exar.com>,
Jon Mason <jon.mason@exar.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] vxge: potential NULL dereference
Date: Fri, 10 Sep 2010 11:54:23 +0000 [thread overview]
Message-ID: <20100910115423.GC5959@bicker> (raw)
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;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Ramkrishna Vepa <ramkrishna.vepa@exar.com>
Cc: Sivakumar Subramani <sivakumar.subramani@exar.com>,
Sreenivasa Honnur <sreenivasa.honnur@exar.com>,
Jon Mason <jon.mason@exar.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] vxge: potential NULL dereference
Date: Fri, 10 Sep 2010 13:54:23 +0200 [thread overview]
Message-ID: <20100910115423.GC5959@bicker> (raw)
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;
next reply other threads:[~2010-09-10 11:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-10 11:54 Dan Carpenter [this message]
2010-09-10 11:54 ` [patch] vxge: potential NULL dereference Dan Carpenter
2010-09-10 20:32 ` David Miller
2010-09-10 20:32 ` David Miller
2010-09-10 21:12 ` Dan Carpenter
2010-09-10 21:12 ` Dan Carpenter
2010-09-10 21:32 ` Jon Mason
2010-09-10 21:32 ` Jon Mason
2010-09-10 21:40 ` David Miller
2010-09-10 21:40 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100910115423.GC5959@bicker \
--to=error27@gmail.com \
--cc=davem@davemloft.net \
--cc=jon.mason@exar.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ramkrishna.vepa@exar.com \
--cc=sivakumar.subramani@exar.com \
--cc=sreenivasa.honnur@exar.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.