aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authoryuuzheng <[email protected]>2020-11-02 22:25:28 +0530
committerMartin K. Petersen <[email protected]>2020-11-04 22:55:38 -0500
commit1f889b58716a5f5e3e4fe0e6742c1a4472f29ac1 (patch)
tree659be121684dc68dc04ab03c28308eb1ebe5c018 /tools/perf/scripts/python/netdev-times.py
parent48cd6b38eb4f2874f091c4776ea1c26e7e4f967e (diff)
scsi: pm80xx: Fix pm8001_mpi_get_nvmd_resp() race condition
A use-after-free or null-pointer error occurs when the 251-byte response data is copied from IOMB buffer to response message buffer in function pm8001_mpi_get_nvmd_resp(). After sending the command get_nvmd_data(), the caller begins to sleep by calling wait_for_complete() and waits for the wake-up from calling complete() in pm8001_mpi_get_nvmd_resp(). Due to unexpected events (e.g., interrupt), if response buffer gets freed before memcpy(), a use-after-free error will occur. To fix this, the complete() should be called after memcpy(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: yuuzheng <[email protected]> Signed-off-by: Viswas G <[email protected]> Signed-off-by: Ruksar Devadi <[email protected]> Signed-off-by: Radha Ramachandran <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions