diff options
author | Igor Pylypiv <[email protected]> | 2024-06-27 15:59:23 +0000 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2024-07-04 22:53:13 -0400 |
commit | e4f949ef1516c0d74745ee54a0f4882c1f6c7aea (patch) | |
tree | aa457fe6ae27b130c558fcb7d7005b3c6b8ff4f9 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 7cbff570dbe8907e23bba06f6414899a0fbb2fcc (diff) |
scsi: pm80xx: Set phy->enable_completion only when we wait for it
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 <[email protected]>
Signed-off-by: Terrence Adams <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Acked-by: Jack Wang <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions