[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201228125032.869230554@linuxfoundation.org>
Date: Mon, 28 Dec 2020 13:44:06 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Vikram Auradkar <auradkar@...gle.com>,
Jack Wang <jinpu.wang@...ud.ionos.com>,
"Ahmed S. Darwish" <a.darwish@...utronix.de>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 248/717] scsi: pm80xx: Do not sleep in atomic context
From: Ahmed S. Darwish <a.darwish@...utronix.de>
[ Upstream commit 4ba9e516573e60c471c01bb369144651f6f8d50b ]
hw_event_sas_phy_up() is used in hardirq/softirq context:
pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet
=> PM8001_CHIP_DISP->isr() = pm80xx_chip_isr()
=> process_oq() [spin_lock_irqsave(&pm8001_ha->lock,)]
=> process_one_iomb()
=> mpi_hw_event()
=> hw_event_sas_phy_up()
=> msleep(200)
Revert the msleep() back to an mdelay() to avoid sleeping in atomic
context.
Link: https://lore.kernel.org/r/20201126132952.2287996-2-bigeasy@linutronix.de
Fixes: 4daf1ef3c681 ("scsi: pm80xx: Convert 'long' mdelay to msleep")
Cc: Vikram Auradkar <auradkar@...gle.com>
Cc: Jack Wang <jinpu.wang@...ud.ionos.com>
Acked-by: Jack Wang <jinpu.wang@...ud.ionos.com>
Signed-off-by: Ahmed S. Darwish <a.darwish@...utronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/scsi/pm8001/pm80xx_hwi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c
index 7593f248afb2c..155382ce84698 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.c
+++ b/drivers/scsi/pm8001/pm80xx_hwi.c
@@ -3363,7 +3363,7 @@ hw_event_sas_phy_up(struct pm8001_hba_info *pm8001_ha, void *piomb)
pm8001_get_attached_sas_addr(phy, phy->sas_phy.attached_sas_addr);
spin_unlock_irqrestore(&phy->sas_phy.frame_rcvd_lock, flags);
if (pm8001_ha->flags == PM8001F_RUN_TIME)
- msleep(200);/*delay a moment to wait disk to spinup*/
+ mdelay(200); /* delay a moment to wait for disk to spin up */
pm8001_bytes_dmaed(pm8001_ha, phy_id);
}
--
2.27.0
Powered by blists - more mailing lists