cxgb3 - fix skb->dev dereference
authorDivy Le Ray <divy@chelsio.com>
Wed, 30 May 2007 17:01:29 +0000 (10:01 -0700)
committerJeff Garzik <jeff@garzik.org>
Wed, 20 Jun 2007 23:16:58 +0000 (19:16 -0400)
eth_type_trans() now sets skb->dev.
References to skb->dev should happen after it is called.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/cxgb3/sge.c

index 3666586a4831d530d765d4e280e24ad8ec826a21..eaa7dace418296b1661247dde4276c53ef8e8d56 100644 (file)
@@ -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) {