[ 19/21] ntb_netdev: remove from list on exit

From: Greg Kroah-Hartman
Date: Wed May 22 2013 - 18:12:44 EST

3.9-stable review patch. If anyone has any objections, please let me know.


From: Jon Mason <jon.mason@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

drivers/net/ntb_netdev.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -375,6 +375,8 @@ static void ntb_netdev_remove(struct pci
if (dev == NULL)

+ list_del(&dev->list);
ndev = dev->ndev;


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/