[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <483298A0.20405@cn.fujitsu.com>
Date: Tue, 20 May 2008 17:23:44 +0800
From: Wang Chen <wangchen@...fujitsu.com>
To: santil@...ibm.com, "David S. Miller" <davem@...emloft.net>,
Jeff Garzik <jgarzik@...ox.com>,
NETDEV <netdev@...r.kernel.org>
Subject: [PATCH 2/2] ibmveth: make sure skb is not null
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@...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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists