From: Divy Le Ray Date: Wed, 30 May 2007 17:01:29 +0000 (-0700) Subject: cxgb3 - fix skb->dev dereference X-Git-Tag: v2.6.22-rc6~50 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e360b5628f1d040c0e96dd9ee011196645e08aef;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 3666586a483..eaa7dace418 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -1690,8 +1690,8 @@ static void rx_eth(struct adapter *adap, struct sge_rspq *rq, struct port_info *pi; skb_pull(skb, sizeof(*p) + pad); - skb->dev->last_rx = jiffies; skb->protocol = eth_type_trans(skb, adap->port[p->iff]); + skb->dev->last_rx = jiffies; pi = netdev_priv(skb->dev); if (pi->rx_csum_offload && p->csum_valid && p->csum == 0xffff && !p->fragment) {