aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/failed-syscalls-by-pid.py
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2021-06-02 13:30:26 +0000
committerMartin K. Petersen <[email protected]>2021-06-08 02:12:44 +0000
commit66a834d092930cf41d809c0e989b13cd6f9ca006 (patch)
tree887ea2cfbda60d34674863452f8a0050a3f8f2ab /tools/perf/scripts/python/failed-syscalls-by-pid.py
parentscsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V (diff)
downloadkernel-66a834d092930cf41d809c0e989b13cd6f9ca006.tar.gz
kernel-66a834d092930cf41d809c0e989b13cd6f9ca006.zip
scsi: core: Fix error handling of scsi_host_alloc()
After device is initialized via device_initialize(), or its name is set via dev_set_name(), the device has to be freed via put_device(). Otherwise device name will be leaked because it is allocated dynamically in dev_set_name(). Fix the leak by replacing kfree() with put_device(). Since scsi_host_dev_release() properly handles IDA and kthread removal, remove special-casing these from the error handling as well. Link: https://lore.kernel.org/r/[email protected] Cc: Bart Van Assche <[email protected]> Cc: John Garry <[email protected]> Cc: Hannes Reinecke <[email protected]> Tested-by: John Garry <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions