]> err.no Git - linux-2.6/commitdiff
virtio_net: Fix oops on early interrupts - introduced by virtio reset code
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 18 Feb 2008 09:02:51 +0000 (10:02 +0100)
committerJeff Garzik <jeff@garzik.org>
Sun, 24 Feb 2008 04:55:04 +0000 (23:55 -0500)
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/virtio_net.c

index fdc23678117bdd31157a13c6d428d2c1951dc778..19fd4cb0ddf8583cbd9235b6085a7ad1100dfa19 100644 (file)
@@ -361,6 +361,7 @@ static int virtnet_probe(struct virtio_device *vdev)
        netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
        vi->dev = dev;
        vi->vdev = vdev;
+       vdev->priv = vi;
 
        /* We expect two virtqueues, receive then send. */
        vi->rvq = vdev->config->find_vq(vdev, 0, skb_recv_done);
@@ -395,7 +396,6 @@ static int virtnet_probe(struct virtio_device *vdev)
        }
 
        pr_debug("virtnet: registered device %s\n", dev->name);
-       vdev->priv = vi;
        return 0;
 
 unregister: