]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
smartpqi: Drop spinlock before freeing memory
authorJohn F. Carr <jfc@mit.edu>
Thu, 19 Oct 2023 03:02:42 +0000 (21:02 -0600)
committerWarner Losh <imp@FreeBSD.org>
Thu, 19 Oct 2023 03:06:40 +0000 (21:06 -0600)
commitb064a4c9eed5b1dd2a40fc4fd2cb7e738b681547
tree76fc65fea8fb44229aacd961b846c7aafe2254c3
parent767c97c501ae72eb3d74bc23ddf5a1d570d8f841
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
sys/dev/smartpqi/smartpqi_discovery.c