summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
authorWenchao Hao <haowenchao2@huawei.com>2023-02-25 13:01:36 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-08 05:02:09 +0300
commitd3c57724f1569311e4b81e98fad0931028b9bdcd (patch)
tree3ead6c2142e79c2ddd58b1627d3b6f5289d511a2 /tools/perf/scripts/python/syscall-counts.py
parent288b3271d920c9ba949c3bab0f749f4cecc70e09 (diff)
downloadlinux-d3c57724f1569311e4b81e98fad0931028b9bdcd.tar.xz
scsi: mpt3sas: Fix NULL pointer access in mpt3sas_transport_port_add()
Port is allocated by sas_port_alloc_num() and rphy is allocated by either sas_end_device_alloc() or sas_expander_alloc(), all of which may return NULL. So we need to check the rphy to avoid possible NULL pointer access. If sas_rphy_add() returned with failure, rphy is set to NULL. We would access the rphy in the following lines which would also result NULL pointer access. Fixes: 78316e9dfc24 ("scsi: mpt3sas: Fix possible resource leaks in mpt3sas_transport_port_add()") Signed-off-by: Wenchao Hao <haowenchao2@huawei.com> Link: https://lore.kernel.org/r/20230225100135.2109330-1-haowenchao2@huawei.com Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions