]> git.hungrycats.org Git - linux/commitdiff
ntb_netdev: remove from list on exit
authorJon Mason <jon.mason@intel.com>
Thu, 18 Apr 2013 20:36:43 +0000 (13:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2013 18:36:05 +0000 (11:36 -0700)
commit 904435cf76a9bdd5eb41b1c4e049d5a64f3a8400 upstream.

The ntb_netdev device is not removed from the global list of devices
upon device removal.  If the device is re-added, the removal code would
find the first instance and try to remove an already removed device.

Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ntb_netdev.c

index ed947dd76fbd1ded245f3e649dcf920cbe86320f..f3cdf64997d60dd6937ba8885dab3c72525b1f2b 100644 (file)
@@ -375,6 +375,8 @@ static void ntb_netdev_remove(struct pci_dev *pdev)
        if (dev == NULL)
                return;
 
+       list_del(&dev->list);
+
        ndev = dev->ndev;
 
        unregister_netdev(ndev);