Patch "scsi: qla2xxx: check UNLOADING before posting async work" has been added to the 5.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: qla2xxx: check UNLOADING before posting async work

to the 5.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-qla2xxx-check-unloading-before-posting-async-wo.patch
and it can be found in the queue-5.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7cfdb0640d4d9f5869c415d0825a823c21946c6e
Author: Martin Wilck <mwilck@xxxxxxxx>
Date:   Tue Apr 21 22:46:21 2020 +0200

    scsi: qla2xxx: check UNLOADING before posting async work
    
    commit 5a263892d7d0b4fe351363f8d1a14c6a75955475 upstream.
    
    qlt_free_session_done() tries to post async PRLO / LOGO, and waits for the
    completion of these async commands. If UNLOADING is set, this is doomed to
    timeout, because the async logout command will never complete.
    
    The only way to avoid waiting pointlessly is to fail posting these commands
    in the first place if the driver is in UNLOADING state.  In general,
    posting any command should be avoided when the driver is UNLOADING.
    
    With this patch, "rmmod qla2xxx" completes without noticeable delay.
    
    Link: https://lore.kernel.org/r/20200421204621.19228-3-mwilck@xxxxxxxx
    Fixes: 45235022da99 ("scsi: qla2xxx: Fix driver unload by shutting down chip")
    Acked-by: Arun Easi <aeasi@xxxxxxxxxxx>
    Reviewed-by: Himanshu Madhani <himanshu.madhani@xxxxxxxxxx>
    Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 4a89202115521..98908c2a096a7 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4854,6 +4854,9 @@ qla2x00_alloc_work(struct scsi_qla_host *vha, enum qla_work_type type)
 	struct qla_work_evt *e;
 	uint8_t bail;
 
+	if (test_bit(UNLOADING, &vha->dpc_flags))
+		return NULL;
+
 	QLA_VHA_MARK_BUSY(vha, bail);
 	if (bail)
 		return NULL;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux