Commit c40bff41 authored by Stefan Raspl's avatar Stefan Raspl Committed by David S. Miller
Browse files

net/smc: Terminate connections prior to device removal



Removing an ISM device prior to terminating its associated connections
doesn't end well.

Signed-off-by: default avatarStefan Raspl <raspl@linux.ibm.com>
Signed-off-by: default avatarJan Karcher <jaka@linux.ibm.com>
Signed-off-by: default avatarWenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0671115
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -462,11 +462,11 @@ void smcd_unregister_dev(struct smcd_dev *smcd)
{
	pr_warn_ratelimited("smc: removing smcd device %s\n",
			    dev_name(&smcd->dev));
	smcd->going_away = 1;
	smc_smcd_terminate_all(smcd);
	mutex_lock(&smcd_dev_list.mutex);
	list_del_init(&smcd->list);
	mutex_unlock(&smcd_dev_list.mutex);
	smcd->going_away = 1;
	smc_smcd_terminate_all(smcd);
	destroy_workqueue(smcd->event_wq);

	device_del(&smcd->dev);