On 1/17/2019 8:14 AM, Ewan D. Milne wrote:
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 hang if slub_debug=FZPU is enabled.

Fix this by putting the completion on the stack.

Signed-off-by: Ewan D. Milne <emi...@redhat.com>
---
  drivers/scsi/lpfc/lpfc_nvmet.c | 8 +++++---
  drivers/scsi/lpfc/lpfc_nvmet.h | 2 +-
  2 files changed, 6 insertions(+), 4 deletions(-)



Reviewed-by:   James Smart  <james.sm...@broadcom.com>

Thank you Ewan

-- james

Reply via email to