Blob Blame History Raw
From: "Ahmed S. Darwish" <a.darwish@linutronix.de>
Date: Thu, 26 Nov 2020 14:29:43 +0100
Subject: scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt())
Patch-mainline: v5.11-rc1
Git-commit: 9fef41f25d60d3cb22ee81d5d92cdea99a1b35ea
References: bsc#1172538 bsc#1179142 bsc#1179810

tcm_qla2xxx_free_session() has a BUG_ON(in_interrupt()).

While in_interrupt() is ill-defined and does not provide what the name
suggests, it is not needed here: the function is always invoked from
workqueue context through "struct qla_tgt_func_tmpl" ->free_session() hook
it is bound to.

The function also calls wait_event_timeout() down the chain, which already
has a might_sleep().

Remove the in_interrupt() check.

Link: https://lore.kernel.org/r/20201126132952.2287996-6-bigeasy@linutronix.de
Cc: Nilesh Javali <njavali@marvell.com>
Cc: <GR-QLogic-Storage-Upstream@marvell.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c |    2 --
 1 file changed, 2 deletions(-)

--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -1457,8 +1457,6 @@ static void tcm_qla2xxx_free_session(str
 	struct se_session *se_sess;
 	struct tcm_qla2xxx_lport *lport;
 
-	BUG_ON(in_interrupt());
-
 	se_sess = sess->se_sess;
 	if (!se_sess) {
 		pr_err("struct fc_port->se_sess is NULL\n");