From: Wang Chen <wangchen@cn.fujitsu.com>
To: santil@us.ibm.com, "David S. Miller" <davem@davemloft.net>,
Jeff Garzik <jgarzik@pobox.com>, NETDEV <netdev@vger.kernel.org>
Subject: [PATCH 2/2] ibmveth: make sure skb is not null
Date: Tue, 20 May 2008 17:23:44 +0800 [thread overview]
Message-ID: <483298A0.20405@cn.fujitsu.com> (raw)
In-Reply-To: <48329650.60809@cn.fujitsu.com>
There is no assurance to guarantee ibmveth_rxq_get_buffer won't return a NULL.
So add an assertion here.
No device, not tested.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
---
drivers/net/ibmveth.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 0052780..9d1523a 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -945,6 +945,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
int csum_good = ibmveth_rxq_csum_good(adapter);
skb = ibmveth_rxq_get_buffer(adapter);
+ ibmveth_assert(skb != NULL);
if (csum_good)
skb->ip_summed = CHECKSUM_UNNECESSARY;
--
1.5.3.4
next prev parent reply other threads:[~2008-05-20 9:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-20 9:13 [PATCH 1/2] 3C509: rx_bytes should not be increased when alloc_skb failed Wang Chen
2008-05-20 9:23 ` Wang Chen [this message]
2008-05-22 18:02 ` Jeff Garzik
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=483298A0.20405@cn.fujitsu.com \
--to=wangchen@cn.fujitsu.com \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
--cc=santil@us.ibm.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.