ia64/xen-unstable

changeset 3228:5765cdc6ec63

bitkeeper revision 1.1159.187.46 (41ada9acdxj1sndHML6zY6jvbR0CFg)

Fix netback driver to correctly free the net device struct.
author kaf24@scramble.cl.cam.ac.uk
date Wed Dec 01 11:23:24 2004 +0000 (2004-12-01)
parents d2817f9531ad
children 99caf078a6e4
files linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c	Wed Dec 01 09:39:42 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/drivers/xen/netback/interface.c	Wed Dec 01 11:23:24 2004 +0000
     1.3 @@ -35,8 +35,8 @@ static void __netif_disconnect_complete(
     1.4  
     1.5      /*
     1.6       * These can't be done in netif_disconnect() because at that point there
     1.7 -     * may be outstanding requests at the disc whose asynchronous responses
     1.8 -     * must still be notified to the remote driver.
     1.9 +     * may be outstanding requests in the network stack whose asynchronous
    1.10 +     * responses must still be notified to the remote driver.
    1.11       */
    1.12      unbind_evtchn_from_irq(netif->evtchn);
    1.13      vfree(netif->tx); /* Frees netif->rx as well. */
    1.14 @@ -84,7 +84,7 @@ void netif_create(netif_be_create_t *cre
    1.15      unsigned int       handle = create->netif_handle;
    1.16      struct net_device *dev;
    1.17      netif_t          **pnetif, *netif;
    1.18 -    char               name[IFNAMSIZ] = {};
    1.19 +    char               name[IFNAMSIZ];
    1.20  
    1.21      snprintf(name, IFNAMSIZ - 1, "vif%u.%u", domid, handle);
    1.22      dev = alloc_netdev(sizeof(netif_t), name, ether_setup);
    1.23 @@ -116,7 +116,7 @@ void netif_create(netif_be_create_t *cre
    1.24          {
    1.25              DPRINTK("Could not create netif: already exists\n");
    1.26              create->status = NETIF_BE_STATUS_INTERFACE_EXISTS;
    1.27 -            kfree(dev);
    1.28 +            free_netdev(dev);
    1.29              return;
    1.30          }
    1.31          pnetif = &(*pnetif)->hash_next;
    1.32 @@ -137,7 +137,7 @@ void netif_create(netif_be_create_t *cre
    1.33          DPRINTK("Could not register new net device %s: err=%d\n",
    1.34                  dev->name, err);
    1.35          create->status = NETIF_BE_STATUS_OUT_OF_MEMORY;
    1.36 -        kfree(dev);
    1.37 +        free_netdev(dev);
    1.38          return;
    1.39      }
    1.40  
    1.41 @@ -176,7 +176,7 @@ void netif_destroy(netif_be_destroy_t *d
    1.42   destroy:
    1.43      *pnetif = netif->hash_next;
    1.44      unregister_netdev(netif->dev);
    1.45 -    kfree(netif->dev);
    1.46 +    free_netdev(netif->dev);
    1.47      destroy->status = NETIF_BE_STATUS_OKAY;
    1.48  }
    1.49