scsi: qla2xxx: Fix unbound sleep in fcport delete path.
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>
This commit is contained in:
parent
248a445adf
commit
c3b6a1d397
|
@ -1020,6 +1020,7 @@ void qlt_free_session_done(struct work_struct *work)
|
||||||
|
|
||||||
if (logout_started) {
|
if (logout_started) {
|
||||||
bool traced = false;
|
bool traced = false;
|
||||||
|
u16 cnt = 0;
|
||||||
|
|
||||||
while (!READ_ONCE(sess->logout_completed)) {
|
while (!READ_ONCE(sess->logout_completed)) {
|
||||||
if (!traced) {
|
if (!traced) {
|
||||||
|
@ -1029,6 +1030,9 @@ void qlt_free_session_done(struct work_struct *work)
|
||||||
traced = true;
|
traced = true;
|
||||||
}
|
}
|
||||||
msleep(100);
|
msleep(100);
|
||||||
|
cnt++;
|
||||||
|
if (cnt > 200)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ql_dbg(ql_dbg_disc, vha, 0xf087,
|
ql_dbg(ql_dbg_disc, vha, 0xf087,
|
||||||
|
|
Loading…
Reference in New Issue