net/smc: abnormal termination of SMCD link groups

A final cleanup due to SMCD device removal means immediate freeing
of all link groups belonging to this device in interrupt context.

This patch introduces a separate SMCD link group termination routine,
which terminates all link groups of an SMCD device.

This new routine smcd_terminate_all ()is reused if the smc module is
unloaded.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ursula Braun
2019-11-14 13:02:42 +01:00
committed by David S. Miller
parent 42bfba9eaa
commit 5421ec281d
6 changed files with 57 additions and 21 deletions

View File

@@ -329,7 +329,7 @@ void smcd_unregister_dev(struct smcd_dev *smcd)
list_del_init(&smcd->list);
spin_unlock(&smcd_dev_list.lock);
smcd->going_away = 1;
smc_smcd_terminate(smcd, 0, VLAN_VID_MASK);
smc_smcd_terminate_all(smcd);
flush_workqueue(smcd->event_wq);
destroy_workqueue(smcd->event_wq);