aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/mem-phys-addr.py
diff options
context:
space:
mode:
authorJames Smart <[email protected]>2022-09-11 15:14:58 -0700
committerMartin K. Petersen <[email protected]>2022-09-15 22:18:27 -0400
commit6e5c5d246e6c16127327eeecf61ef2cf21a94ce5 (patch)
treee620636031c09cb8f6b6dfd29de0555275ec5639 /tools/perf/scripts/python/mem-phys-addr.py
parent845363516bb75bc35089b4093d1fae139f2fffc6 (diff)
scsi: lpfc: Move scsi_host_template outside dynamically allocated/freed phba
On a PCI hotplug capable system, it is possible for scsi_device_put() to happen after lpfc_pci_remove_one() is called. As a result, the sdev->host->hostt->module dereference is for a previously freed memory location because the phba structure containing the hostt template was already freed when lpfc_pci_remove_one() returned. Since the lpfc module is still loaded during power slot disable, all scsi_host_templates should be declared as part of the global data segment instead of inside the heap allocated phba structure. This way the sdev->host->hostt memory area is always valid as long as the module is loaded regardless if PCI hotplug dynamically allocates or frees phba structures. Move all scsi_host_templates in the phba structure to global variables. Create a small helper routine to determine appropriate sg_tablesize during shost allocation. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Dwip N. Banerjee <[email protected]> Signed-off-by: Dwip N. Banerjee <[email protected]> Co-developed-by: Daniel Wagner <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Co-developed-by: Justin Tee <[email protected]> Signed-off-by: Justin Tee <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions