Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] scsi: mpi3mr: Fix error handling and resource leak in mpi3mr_sas_port_add()
@ 2026-08-12 10:33 Milan P. Gandhi
  2026-08-12 10:33 ` [PATCH 1/2] scsi: mpi3mr: Fix NULL pointer dereference " Milan P. Gandhi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Milan P. Gandhi @ 2026-08-12 10:33 UTC (permalink / raw)
  To: linux-scsi; +Cc: Milan P. Gandhi

This series fixes resource leaks and potential crashes in the
mpi3mr_sas_port_add() error path:

- Patch 1 adds a missing NULL check on sas_port_alloc_num() failure
  and ensures allocated ports are released via sas_port_free() if
  sas_port_add() fails.
- Patch 2 releases the target device reference acquired via
  mpi3mr_get_tgtdev_by_addr() if subsequent allocation errors occur.

Milan P. Gandhi (2):
  scsi: mpi3mr: Fix NULL pointer dereference in mpi3mr_sas_port_add()
  scsi: mpi3mr: Fix target device refcount leak in mpi3mr_sas_port_add()

 drivers/scsi/mpi3mr/mpi3mr_transport.c | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-12 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 10:33 [PATCH 0/2] scsi: mpi3mr: Fix error handling and resource leak in mpi3mr_sas_port_add() Milan P. Gandhi
2026-08-12 10:33 ` [PATCH 1/2] scsi: mpi3mr: Fix NULL pointer dereference " Milan P. Gandhi
2026-08-12 10:43   ` sashiko-bot
2026-08-12 11:29     ` Milan P. Gandhi
2026-08-12 10:33 ` [PATCH 2/2] scsi: mpi3mr: Fix target device refcount leak " Milan P. Gandhi
2026-08-12 10:42   ` sashiko-bot
2026-08-12 12:59 ` [PATCH 0/2] scsi: mpi3mr: Fix error handling and resource " Laurence Oberman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox