diff options
author | Justin Tee <justin.tee@broadcom.com> | 2024-11-01 01:32:11 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-11-03 04:45:24 +0300 |
commit | d35f7672715d1ff3e3ad9bb4ae6ac6cb484200fe (patch) | |
tree | 4de582ca8c13d515bf758d417d937fdb6feb6c71 /tools/perf/scripts/python/intel-pt-events.py | |
parent | 4c113ac05bb246813f0a3003307ad93b1c2d7d02 (diff) | |
download | linux-d35f7672715d1ff3e3ad9bb4ae6ac6cb484200fe.tar.xz |
scsi: lpfc: Call lpfc_sli4_queue_unset() in restart and rmmod paths
During initialization, the driver allocates wq->pring in lpfc_wq_create
and lpfc_sli4_queue_unset() is the only place where kfree(wq->pring) is
called.
There is a possible memory leak in lpfc_sli_brdrestart_s4() (restart)
and lpfc_pci_remove_one_s4() (rmmod) paths because there are no calls to
lpfc_sli4_queue_unset() to kfree() the wq->pring.
Fix by inserting a call to lpfc_sli4_queue_unset() in
lpfc_sli_brdrestart_s4() and lpfc_sli4_hba_unset() routines. Also, add
a check for the SLI_ACTIVE flag before issuing the Q_DESTROY mailbox
command. If not set, then the mailbox command will obviously fail. In
such cases, skip issuing the mailbox command and only execute the driver
resource clean up portions of the lpfc_*q_destroy routines.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20241031223219.152342-4-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/intel-pt-events.py')
0 files changed, 0 insertions, 0 deletions