Message ID | 20210410184016.21603-10-michael.christie@oracle.com |
---|---|
State | Superseded |
Headers | show |
Series | : qedi tmf fixes | expand |
> -----Original Message----- > From: Mike Christie <michael.christie@oracle.com> > Sent: Sunday, April 11, 2021 12:10 AM > To: lduncan@suse.com; martin.petersen@oracle.com; Manish Rangankar > <mrangankar@marvell.com>; Santosh Vernekar <svernekar@marvell.com>; > linux-scsi@vger.kernel.org; jejb@linux.ibm.com > Cc: Mike Christie <michael.christie@oracle.com> > Subject: [EXT] [PATCH 09/13] scsi: qedi: fix session block/unblock abuse during > tmf handling > > External Email > > ---------------------------------------------------------------------- > Drivers shouldn't be calling block/unblock session for tmf handling because the > functions can change the session state from under libiscsi. > We now block the session for the drivers during tmf processing, so we can > remove these calls. > > Signed-off-by: Mike Christie <michael.christie@oracle.com> > --- > drivers/scsi/qedi/qedi_fw.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index > 84402e827d42..f13f8af6d931 100644 > --- a/drivers/scsi/qedi/qedi_fw.c > +++ b/drivers/scsi/qedi/qedi_fw.c > @@ -159,14 +159,9 @@ static void qedi_tmf_resp_work(struct work_struct > *work) > set_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); > resp_hdr_ptr = (struct iscsi_tm_rsp *)qedi_cmd->tmf_resp_buf; > > - iscsi_block_session(session->cls_session); > rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true); > - if (rval) { > - iscsi_unblock_session(session->cls_session); > + if (rval) > goto exit_tmf_resp; > - } > - > - iscsi_unblock_session(session->cls_session); > > spin_lock(&session->back_lock); > __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0); > -- > 2.25.1 Thanks, Reviewed-by: Manish Rangankar <mrangankar@marvell.com>
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 84402e827d42..f13f8af6d931 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -159,14 +159,9 @@ static void qedi_tmf_resp_work(struct work_struct *work) set_bit(QEDI_CONN_FW_CLEANUP, &qedi_conn->flags); resp_hdr_ptr = (struct iscsi_tm_rsp *)qedi_cmd->tmf_resp_buf; - iscsi_block_session(session->cls_session); rval = qedi_cleanup_all_io(qedi, qedi_conn, qedi_cmd->task, true); - if (rval) { - iscsi_unblock_session(session->cls_session); + if (rval) goto exit_tmf_resp; - } - - iscsi_unblock_session(session->cls_session); spin_lock(&session->back_lock); __iscsi_complete_pdu(conn, (struct iscsi_hdr *)resp_hdr_ptr, NULL, 0);
Drivers shouldn't be calling block/unblock session for tmf handling because the functions can change the session state from under libiscsi. We now block the session for the drivers during tmf processing, so we can remove these calls. Signed-off-by: Mike Christie <michael.christie@oracle.com> --- drivers/scsi/qedi/qedi_fw.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)