From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jon Mason Subject: [ 19/21] ntb_netdev: remove from list on exit Date: Wed, 22 May 2013 15:10:37 -0700 Message-Id: <20130522205234.847841053@linuxfoundation.org> In-Reply-To: <20130522205232.597066680@linuxfoundation.org> References: <20130522205232.597066680@linuxfoundation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: 3.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jon Mason 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 Signed-off-by: Greg Kroah-Hartman --- 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) return; + list_del(&dev->list); + ndev = dev->ndev; unregister_netdev(ndev);