HomeFreeBSD

smartpqi: Drop spinlock before freeing memory

Description

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 is the alternate fix from the box.

(this is not a cherry pick of b064a4c9eed5b1dd2a40fc4fd2cb7e738b681547)

(cherry picked from commit 898e02d740741d13a8948cbad4e0d969a768fd30)

Approved-by: re (cperciva)

Details

Provenance
John F. Carr <jfc@mit.edu>Authored on Oct 19 2023, 3:02 AM
impCommitted on Feb 19 2024, 6:59 AM
Parents
rGc6edb21e3763: unbound: Vendor import 1.19.1
Branches
Unknown
Tags
Unknown