Re: [PATCH 05/14] scsi: qla2xxx: tcm_qla2xxx: Remove BUG_ON(in_interrupt()).

Himanshu Madhani
2020-11-30T19:16:53Z

> On Nov 26, 2020, at 7:29 AM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
>
> From: "Ahmed S. Darwish" <a.darwish@linutronix.de>
>
> 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.
>
> Signed-off-by: Ahmed S. Darwish <a.darwish@linutronix.de>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Nilesh Javali <njavali@marvell.com>
> Cc: <GR-QLogic-Storage-Upstream@marvell.com>
> ---
> drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index 784b43f181818..b55fc768a2a7a 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -1400,8 +1400,6 @@ static void tcm_qla2xxx_free_session(struct fc_port *sess)
> 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");
> --
> 2.29.2
>

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani Oracle Linux Engineering