diff options
| author | Jaeyoon Choi <jaeyoon@FreeBSD.org> | 2026-08-10 01:51:30 +0000 |
|---|---|---|
| committer | Jaeyoon Choi <jaeyoon@FreeBSD.org> | 2026-08-10 02:28:53 +0000 |
| commit | aaf0e80e684da35cd527491243583467ae7c75cb (patch) | |
| tree | 176bda7216a3c538a4e5f23e4de57b50e743ba92 | |
| parent | c686e7d3b0d315c358be81b4a1151711213d998d (diff) | |
ufshci: release the CCB after sending a start stop unit command
ufshci_sim_send_ssu() got a CCB from cam_periph_getccb() but never
returned it. Each call leaked the CCB and one slot of the device's
CCB allocation budget. When the budget runs out, the next
cam_periph_getccb() waits forever and the suspend path hangs.
Release the CCB while the periph lock is still held, as the other CAM
periph drivers do.
Sponsored by: Samsung Electronics
Reviewed by: imp (mentor)
Differential Revision: https://reviews.freebsd.org/D58669
| -rw-r--r-- | sys/dev/ufshci/ufshci_sim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/ufshci/ufshci_sim.c b/sys/dev/ufshci/ufshci_sim.c index 4a106a6c7b8a..e40079b23354 100644 --- a/sys/dev/ufshci/ufshci_sim.c +++ b/sys/dev/ufshci/ufshci_sim.c @@ -12,6 +12,7 @@ #include <cam/cam_debug.h> #include <cam/cam_periph.h> #include <cam/cam_sim.h> +#include <cam/cam_xpt_periph.h> #include <cam/cam_xpt_sim.h> #include <cam/scsi/scsi_all.h> #include <cam/scsi/scsi_message.h> @@ -542,6 +543,8 @@ ufshci_sim_send_ssu(struct ufshci_controller *ctrlr, bool start, err = cam_periph_runccb(ccb, NULL, 0, SF_RETRY_UA, NULL); + xpt_release_ccb(ccb); + cam_periph_unlock(periph); /* Release periph reference */ cam_periph_release(periph); |
