Message ID | 20191125165702.1013-4-r.bolshakov@yadro.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 4c86b037a6db3ad2922ef3ba8a8989eb7794e040 |
Headers | show |
Series | scsi: qla2xxx: Bug fixes | expand |
On 11/25/19 8:56 AM, Roman Bolshakov wrote: > Target creation triggers a new BUG_ON introduced in in 4d43d395fed12 > ("workqueue: Try to catch flush_work() without INIT_WORK()."). > The BUG_ON reveals an attempt to flush free_work in qla24xx_do_nack_work > before it's initialized in qlt_unreg_sess: [ ... ] Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 1dbee8800218..4f3da968163e 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -4852,6 +4852,7 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags) } INIT_WORK(&fcport->del_work, qla24xx_delete_sess_fn); + INIT_WORK(&fcport->free_work, qlt_free_session_done); INIT_WORK(&fcport->reg_work, qla_register_fcport_fn); INIT_LIST_HEAD(&fcport->gnl_entry); INIT_LIST_HEAD(&fcport->list); diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index f94afb3fe448..74cfcb13fe8a 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1161,7 +1161,6 @@ void qlt_unreg_sess(struct fc_port *sess) sess->last_rscn_gen = sess->rscn_gen; sess->last_login_gen = sess->login_gen; - INIT_WORK(&sess->free_work, qlt_free_session_done); queue_work(sess->vha->hw->wq, &sess->free_work); } EXPORT_SYMBOL(qlt_unreg_sess);