Skip to content

Fix use-after-free errors in lpfc driver when using NVMe

Ewan D. Milne linux-nvme 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lpfc: nvme: avoid hang / use-after-free when destroying localportdrivers/scsi/lpfc/lpfc_nvme.c drivers/scsi/lpfc/lpfc_nvme.h+10 -81 reply
2/2lpfc: nvmet: avoid hang / use-after-free when destroying targetportdrivers/scsi/lpfc/lpfc_nvmet.c drivers/scsi/lpfc/lpfc_nvmet.h+6 -41 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Fix use-after-free errors in lpfc driver when using NVMe

These two patches fix use-after-free errors in the shutdown path of the lpfc driver with both the Initiator and Target mode usage of FC ports.

The problem is very apparent with slub_debug enabled, as the memory poisoning prevents the wait_for_completion_timeout() from returning after the object has been freed.

Ewan D. Milne (2):
lpfc: nvme: avoid hang / use-after-free when destroying localport
lpfc: nvmet: avoid hang / use-after-free when destroying targetport

 drivers/scsi/lpfc/lpfc_nvme.c  | 16 +++++++++-------
 drivers/scsi/lpfc/lpfc_nvme.h  |  2 +-
 drivers/scsi/lpfc/lpfc_nvmet.c |  8 +++++---
 drivers/scsi/lpfc/lpfc_nvmet.h |  2 +-
 4 files changed, 16 insertions(+), 12 deletions(-)
Signature · 1 line
2.1.0