mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
smartpqi: Drop spinlock before freeing memory
pqisrc_free_device frees the device softc with the os spinlock held. This causes crashes when devices are removed because the memory free might sleep (which is prohibited with spin locks held). Drop the spinlock before releasing the memory. MFC After: 2 days PR: 273289 Reviewed by: imp
This commit is contained in:
parent
767c97c501
commit
b064a4c9ee
|
@ -1671,11 +1671,11 @@ pqisrc_free_device(pqisrc_softstate_t * softs, pqi_scsi_dev_t *device)
|
|||
pqisrc_delete_softs_entry(softs, device);
|
||||
DBG_NOTE("Removed memory for device : B %d: T %d: L %d\n",
|
||||
device->bus, device->target, device->lun);
|
||||
OS_RELEASE_SPINLOCK(&softs->devlist_lock);
|
||||
pqisrc_device_mem_free(softs, device);
|
||||
} else {
|
||||
OS_RELEASE_SPINLOCK(&softs->devlist_lock);
|
||||
}
|
||||
|
||||
OS_RELEASE_SPINLOCK(&softs->devlist_lock);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue