[ofa-general] [PATCH 05/10] cxgb3 - fix skb->dev dereference

Steve Wise swise at opengridcomputing.com
Fri Jun 29 14:28:17 PDT 2007


cxgb3 - fix skb->dev dereference

eth_type_trans() now sets skb->dev.
References to skb->dev should happen after it is called.

Signed-off-by: Divy Le Ray <divy at chelsio.com>
Signed-off-by: Jeff Garzik <jeff at garzik.org>
---

 drivers/net/cxgb3/sge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index 027ab2c..090dc1d 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -1685,8 +1685,8 @@ static void rx_eth(struct adapter *adap,
 
 	skb_pull(skb, sizeof(*p) + pad);
 	skb->dev = adap->port[p->iff];
-	skb->dev->last_rx = jiffies;
 	skb->protocol = eth_type_trans(skb, skb->dev);
+	skb->dev->last_rx = jiffies;
 	pi = netdev_priv(skb->dev);
 	if (pi->rx_csum_offload && p->csum_valid && p->csum == 0xffff &&
 	    !p->fragment) {



More information about the general mailing list