Skip to contentSkip to conversation

FAILED: patch "[PATCH] scsi: qla2xxx: Fix crash on session cleanup with unload" failed to apply to 4.14-stable tree

PATCH [email protected] 1 participant 1 message Nov 3, 2020

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 50457dab670f396557e60c07f086358460876353 Mon Sep 17 00:00:00 2001
From: Quinn Tran <[email protected]>
Date: Tue, 29 Sep 2020 03:21:50 -0700
Subject: [PATCH] scsi: qla2xxx: Fix crash on session cleanup with unload

On unload, session cleanup prematurely gave the signal for driver unload path to advance.

drivers/scsi/qla2xxx/qla_target.c +7 -6
index 1ef39a96c4c2..eb4aa97bc71f 100644
@@ -1231,14 +1231,15 @@ void qlt_schedule_sess_for_deletion(struct fc_port *sess)
 	case DSC_DELETE_PEND:
 		return;
 	case DSC_DELETED:
-		if (tgt && tgt->tgt_stop && (tgt->sess_count == 0))
-			wake_up_all(&tgt->waitQ);
-		if (sess->vha->fcport_count == 0)
-			wake_up_all(&sess->vha->fcport_waitQ);
-
 		if (!sess->plogi_link[QLT_PLOGI_LINK_SAME_WWN] &&
-			!sess->plogi_link[QLT_PLOGI_LINK_CONFLICT])
+			!sess->plogi_link[QLT_PLOGI_LINK_CONFLICT]) {
+			if (tgt && tgt->tgt_stop && tgt->sess_count == 0)
+				wake_up_all(&tgt->waitQ);
+
+			if (sess->vha->fcport_count == 0)
+				wake_up_all(&sess->vha->fcport_waitQ);
 			return;
+		}
 		break;
 	case DSC_UPD_FCPORT:
 		/*