aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/call-graph-from-sql.py
diff options
context:
space:
mode:
authorDaniil Stas <[email protected]>2025-01-05 21:36:18 +0000
committerGuenter Roeck <[email protected]>2025-01-07 16:36:01 -0800
commit82163d63ae7a4c36142cd252388737205bb7e4b9 (patch)
tree14d6933fd92e25d3460387c0774ee326c55d1cb4 /tools/perf/scripts/python/call-graph-from-sql.py
parent9d89551994a430b50c4fffcb1e617a057fa76e20 (diff)
hwmon: (drivetemp) Fix driver producing garbage data when SCSI errors occur
scsi_execute_cmd() function can return both negative (linux codes) and positive (scsi_cmnd result field) error codes. Currently the driver just passes error codes of scsi_execute_cmd() to hwmon core, which is incorrect because hwmon only checks for negative error codes. This leads to hwmon reporting uninitialized data to userspace in case of SCSI errors (for example if the disk drive was disconnected). This patch checks scsi_execute_cmd() output and returns -EIO if it's error code is positive. Fixes: 5b46903d8bf37 ("hwmon: Driver for disk and solid state drives with temperature sensors") Signed-off-by: Daniil Stas <[email protected]> Cc: Guenter Roeck <[email protected]> Cc: Chris Healy <[email protected]> Cc: Linus Walleij <[email protected]> Cc: Martin K. Petersen <[email protected]> Cc: Bart Van Assche <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] [groeck: Avoid inline variable declaration for portability] Signed-off-by: Guenter Roeck <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions