On Fri, 2016-11-04 at 09:33 -0700, [email protected] wrote:
...
> @@ -2349,6 +2349,17 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
>       return atomic_read(&vha->loop_state) == LOOP_READY;
>  }
>  
> +static void qla2x00_destroy_mbx_wq(struct qla_hw_data *ha)
> +{
> +     struct workqueue_struct *wq = ha->mbx_wq;
> +
> +     if (wq) {
> +             ha->mbx_wq = NULL;
> +             flush_workqueue(wq);
> +             destroy_workqueue(wq);
> +     }
> +}
> +
>  /*
>   * PCI driver interface
>   */

There is already a function qla2x00_destroy_deferred_work() that
destroys 3 other workqueues.

...

> @@ -3059,6 +3079,8 @@ uint32_t qla2x00_isp_reg_stat(struct qla_hw_data *ha)
>  
>       qla2x00_free_fw_dump(ha);
>  
> +     qla2x00_destroy_mbx_wq(ha);
> +
>       pci_disable_pcie_error_reporting(pdev);
>       pci_disable_device(pdev);
>  }

This code path (pci_driver->shutdown) does not appear to destroy the
other workqueues created by the driver. ???

> @@ -5011,6 +5033,8 @@ void qla2x00_relogin(struct scsi_qla_host *vha)
>        */
>       qla2x00_free_sysfs_attr(base_vha, false);
>  
> +     qla2x00_destroy_mbx_wq(ha);
> +
>       fc_remove_host(base_vha->host);
>  
>       scsi_remove_host(base_vha->host);

See above.

-Ewan


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to