mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 13:15:57 +00:00
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: Stefan Raspl <raspl@linux.ibm.com> Signed-off-by: Jan Karcher <jaka@linux.ibm.com> Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d067111586
commit
c40bff4132
@ -462,11 +462,11 @@ void smcd_unregister_dev(struct smcd_dev *smcd)
|
|||||||
{
|
{
|
||||||
pr_warn_ratelimited("smc: removing smcd device %s\n",
|
pr_warn_ratelimited("smc: removing smcd device %s\n",
|
||||||
dev_name(&smcd->dev));
|
dev_name(&smcd->dev));
|
||||||
|
smcd->going_away = 1;
|
||||||
|
smc_smcd_terminate_all(smcd);
|
||||||
mutex_lock(&smcd_dev_list.mutex);
|
mutex_lock(&smcd_dev_list.mutex);
|
||||||
list_del_init(&smcd->list);
|
list_del_init(&smcd->list);
|
||||||
mutex_unlock(&smcd_dev_list.mutex);
|
mutex_unlock(&smcd_dev_list.mutex);
|
||||||
smcd->going_away = 1;
|
|
||||||
smc_smcd_terminate_all(smcd);
|
|
||||||
destroy_workqueue(smcd->event_wq);
|
destroy_workqueue(smcd->event_wq);
|
||||||
|
|
||||||
device_del(&smcd->dev);
|
device_del(&smcd->dev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user