diff options
author | Igor Pylypiv <ipylypiv@google.com> | 2024-06-27 15:59:23 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-09-12 11:13:00 +0200 |
commit | f14d3e1aa613311c744af32d75125e95fc8ffb84 (patch) | |
tree | d8e4bd055a7fe17f2edbe23ab5b53b50fa30a5ba /block/opal_proto.h | |
parent | 3844586e9bd9845140e1078f1e61896b576ac536 (diff) | |
download | linux-stable-f14d3e1aa613311c744af32d75125e95fc8ffb84.tar.gz linux-stable-f14d3e1aa613311c744af32d75125e95fc8ffb84.tar.bz2 linux-stable-f14d3e1aa613311c744af32d75125e95fc8ffb84.zip |
scsi: pm80xx: Set phy->enable_completion only when we wait for it
[ Upstream commit e4f949ef1516c0d74745ee54a0f4882c1f6c7aea ]
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>
Diffstat (limited to 'block/opal_proto.h')
0 files changed, 0 insertions, 0 deletions