]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cam: Assert we have a reference when freeing sim
authorWarner Losh <imp@FreeBSD.org>
Tue, 6 Oct 2020 23:33:56 +0000 (23:33 +0000)
committerWarner Losh <imp@FreeBSD.org>
Tue, 6 Oct 2020 23:33:56 +0000 (23:33 +0000)
commita1975719dd196176539d359e36b5a156c70b96d0
tree95b3de61b459985f6ba44a41ddb8ece739b870b2
parent6debfd4b1335434c65428be868ecff6282134921
cam: Assert we have a reference when freeing sim

Before we decrement refcount to sleep on the sim, assert that the
refcount >= 1. If it were 0 here, we'd never wake up.
sys/cam/cam_sim.c