Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Wagner <dwagner@suse.de>2019-10-10 19:28:11 +0200
committerDaniel Wagner <dwagner@suse.de>2019-10-14 11:30:26 +0200
commit8e25b7eed04cf3377d943d310af5ccf5c28e2a5a (patch)
tree80b981efc4561df65f6e15622f7a5815ea5efe25
parent64fb44d410d22d46960cd15887496ef1b0f91dac (diff)
scsi: qla2xxx: Fix unbound sleep in fcport delete path
(bsc#1143706 bsc#1082635 bsc#1123034).
-rw-r--r--patches.suse/scsi-qla2xxx-Fix-unbound-sleep-in-fcport-delete-path.patch40
-rw-r--r--series.conf1
2 files changed, 41 insertions, 0 deletions
diff --git a/patches.suse/scsi-qla2xxx-Fix-unbound-sleep-in-fcport-delete-path.patch b/patches.suse/scsi-qla2xxx-Fix-unbound-sleep-in-fcport-delete-path.patch
new file mode 100644
index 0000000000..af1a8e908e
--- /dev/null
+++ b/patches.suse/scsi-qla2xxx-Fix-unbound-sleep-in-fcport-delete-path.patch
@@ -0,0 +1,40 @@
+From: Quinn Tran <qutran@marvell.com>
+Date: Thu, 12 Sep 2019 11:09:06 -0700
+Subject: scsi: qla2xxx: Fix unbound sleep in fcport delete path.
+Patch-mainline: v5.4-rc2
+Git-commit: c3b6a1d397420a0fdd97af2f06abfb78adc370df
+References: bsc#1143706 bsc#1082635 bsc#1123034
+
+There are instances, though rare, where a LOGO request cannot be sent out
+and the thread in free session done can wait indefinitely. Fix this by
+putting an upper bound to sleep.
+
+Link: https://lore.kernel.org/r/20190912180918.6436-3-hmadhani@marvell.com
+Signed-off-by: Quinn Tran <qutran@marvell.com>
+Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Daniel Wagner <dwagner@suse.de>
+---
+ drivers/scsi/qla2xxx/qla_target.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/scsi/qla2xxx/qla_target.c
++++ b/drivers/scsi/qla2xxx/qla_target.c
+@@ -1029,6 +1029,7 @@ void qlt_free_session_done(struct work_s
+
+ if (logout_started) {
+ bool traced = false;
++ u16 cnt = 0;
+
+ while (!READ_ONCE(sess->logout_completed)) {
+ if (!traced) {
+@@ -1038,6 +1039,9 @@ void qlt_free_session_done(struct work_s
+ traced = true;
+ }
+ msleep(100);
++ cnt++;
++ if (cnt > 200)
++ break;
+ }
+
+ ql_dbg(ql_dbg_disc, vha, 0xf087,
diff --git a/series.conf b/series.conf
index 27f007518f..241475e117 100644
--- a/series.conf
+++ b/series.conf
@@ -50063,6 +50063,7 @@
patches.suse/0001-xen-xenbus-fix-self-deadlock-after-killing-user-proc.patch
patches.suse/0001-xen-netfront-do-not-use-0U-as-error-return-value-for.patch
patches.suse/scsi-qla2xxx-Silence-fwdump-template-message.patch
+ patches.suse/scsi-qla2xxx-Fix-unbound-sleep-in-fcport-delete-path.patch
# jejb/scsi for-next
patches.suse/scsi-qla2xxx-Fix-Nport-ID-display-value.patch