提交 c40bff41 编写于 作者: S Stefan Raspl 提交者: David S. Miller

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: NStefan Raspl <raspl@linux.ibm.com>
Signed-off-by: NJan Karcher <jaka@linux.ibm.com>
Signed-off-by: NWenjia Zhang <wenjia@linux.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d0671115
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册