diff options
author | mav <mav@FreeBSD.org> | 2014-11-28 09:23:15 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2014-11-28 09:23:15 +0000 |
commit | d424575bb703021b51b2d0471522de7f7a7680b5 (patch) | |
tree | e5838122d60075cdd24ffaa2b523283929d87eaa /sys/cam | |
parent | 8eec24be066d501086f6efb1c3c53923eb6f57e1 (diff) | |
download | FreeBSD-src-d424575bb703021b51b2d0471522de7f7a7680b5.zip FreeBSD-src-d424575bb703021b51b2d0471522de7f7a7680b5.tar.gz |
MFC r274756:
Remove residual xpt_release_device() call left after r272406 cleanup.
Excessive release here could trigger use-after-free condition and kernel
panic on LUN 0 disconnect.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_xpt.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 56dada4..526aa41 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -2041,23 +2041,7 @@ scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) scan_info->lunindex[target_id]++; } else { mtx_unlock(&target->luns_mtx); - /* - * We're done with scanning all luns. - * - * Nuke the bogus device for lun 0 if lun 0 - * wasn't on the list. - */ - if (first != 0) { - TAILQ_FOREACH(device, - &target->ed_entries, links) { - if (device->lun_id == 0) { - break; - } - } - if (device) { - xpt_release_device(device); - } - } + /* We're done with scanning all luns. */ } } else { mtx_unlock(&target->luns_mtx); |