aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/max197.c
diff options
context:
space:
mode:
authorEwan D. Milne <emilne@redhat.com>2020-07-29 19:10:11 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2020-08-04 20:56:56 -0400
commitaf6de8c60fe9433afa73cea6fcccdccd98ad3e5e (patch)
tree0aeb94dddc14642211877f72ba845c2b58923d37 /drivers/hwmon/max197.c
parent8a8fb8977ea2bdf160b9e475cf2350abbad4f0e7 (diff)
scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport
We cannot wait on a completion object in the lpfc_nvme_targetport structure in the _destroy_targetport() code path because the NVMe/fc transport will free that structure immediately after the .targetport_delete() callback. This results in a use-after-free, and a crash if slub_debug=FZPU is enabled. An earlier fix put put the completion on the stack, but commit 2a0fb340fcc8 ("scsi: lpfc: Correct localport timeout duration error") subsequently changed the code to reference the completion through a pointer in the object rather than the local stack variable. Fix this by using the stack variable directly. Link: https://lore.kernel.org/r/20200729231011.13240-1-emilne@redhat.com Fixes: 2a0fb340fcc8 ("scsi: lpfc: Correct localport timeout duration error") Reviewed-by: James Smart <james.smart@broadcom.com> Signed-off-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/hwmon/max197.c')
0 files changed, 0 insertions, 0 deletions