If we panicked with SIM lock held, do not try to flush caches.
Extra lock recursing will not make debugging easier.
This commit is contained in:
Alexander Motin 2009-12-06 11:48:53 +00:00
parent 4bc9493e7c
commit 21cc85878c
2 changed files with 9 additions and 0 deletions

View File

@ -1040,6 +1040,9 @@ adashutdown(void * arg, int howto)
TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
union ccb ccb;
/* If we paniced with lock held - not recurse here. */
if (cam_periph_owned(periph))
continue;
cam_periph_lock(periph);
softc = (struct ada_softc *)periph->softc;
/*

View File

@ -190,5 +190,11 @@ cam_periph_unlock(struct cam_periph *periph)
mtx_unlock(periph->sim->mtx);
}
static __inline int
cam_periph_owned(struct cam_periph *periph)
{
return (mtx_owned(periph->sim->mtx));
}
#endif /* _KERNEL */
#endif /* _CAM_CAM_PERIPH_H */