linux-imx/drivers/scsi/pm8001
Igor Pylypiv 7b1d779647 scsi: pm80xx: Set phy->enable_completion only when we wait for it
[ Upstream commit e4f949ef15 ]

pm8001_phy_control() populates the enable_completion pointer with a stack
address, sends a PHY_LINK_RESET / PHY_HARD_RESET, waits 300 ms, and
returns. The problem arises when a phy control response comes late.  After
300 ms the pm8001_phy_control() function returns and the passed
enable_completion stack address is no longer valid. Late phy control
response invokes complete() on a dangling enable_completion pointer which
leads to a kernel crash.

Signed-off-by: Igor Pylypiv <ipylypiv@google.com>
Signed-off-by: Terrence Adams <tadamsjr@google.com>
Link: https://lore.kernel.org/r/20240627155924.2361370-2-tadamsjr@google.com
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:11:36 +02:00
..
Makefile
pm80xx_hwi.c scsi: pm80xx: Avoid leaking tags when processing OPC_INB_SET_CONTROLLER_CONFIG command 2023-09-13 20:04:23 -04:00
pm80xx_hwi.h scsi: pm80xx: Set RETFIS when requested by libsas 2023-08-21 17:11:41 -04:00
pm80xx_tracepoints.c
pm80xx_tracepoints.h
pm8001_chips.h
pm8001_ctl.c scsi: pm8001: Use sysfs_emit() in show function callbacks 2023-01-11 21:53:34 -05:00
pm8001_ctl.h
pm8001_defs.h
pm8001_hwi.c scsi: pm80xx: Use phy-specific SAS address when sending PHY_START command 2023-09-13 20:04:22 -04:00
pm8001_hwi.h scsi: pm80xx: Set RETFIS when requested by libsas 2023-08-21 17:11:41 -04:00
pm8001_init.c scsi: pm8001: Setup IRQs on resume 2023-09-13 20:08:40 -04:00
pm8001_sas.c scsi: pm80xx: Set phy->enable_completion only when we wait for it 2024-09-12 11:11:36 +02:00
pm8001_sas.h scsi: pm8001: Remove unused declarations 2023-08-21 17:13:57 -04:00