scsi: pm80xx: Pass gfp_t flags to libsas event notifiers
mainline inclusion from mainline-master commit cd4e8176 category: bugfix bugzilla: 175270 CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd4e8176989f4909550ac7b95f475e993ae67f8b ------------------------------------------------------------------------ Use the new libsas event notifiers API, which requires callers to explicitly pass the gfp_t memory allocation flags. Call chain analysis, pm8001_hwi.c: 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() -> pm8001_bytes_dmaed() -> hw_event_sata_phy_up -> pm8001_bytes_dmaed() All functions are invoked by process_one_iomb(), which is invoked by the interrupt service routine and the tasklet handler. A similar call chain is also found at pm80xx_hwi.c. Pass GFP_ATOMIC. For pm8001_sas.c, pm8001_phy_control() runs in task context as it calls wait_for_completion() and msleep(). Pass GFP_KERNEL. Link: https://lore.kernel.org/r/20210118100955.1761652-10-a.darwish@linutronix.de Cc: Jack Wang <jinpu.wang@cloud.ionos.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> Reviewed-by: NJack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: NAhmed S. Darwish <a.darwish@linutronix.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com> Reviewed-by: NOuyangdelong <ouyangdelong@huawei.com> Signed-off-by: NNifujia <nifujia1@hisilicon.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录