From ac11db3545cb6669bb710456fe1c85c483d94e23 Mon Sep 17 00:00:00 2001 From: Magliano Andrea Date: Thu, 23 Jun 2011 19:23:28 +0200 Subject: [PATCH 2/2] TAILQ_EMPTY now done in camisr_runqueue(), so useless here. This way TAILQ_EMPTY is now protected by a spin lock, (probably) eliminating following kernel panic: panic: Bad link elm 0xffffffe01e019e78 next->prev != elm panic() at panic+0x1ed camisr_runqueue() at camisr_runqueue+0x87 swi_cambio() at swi_cambio+0x169 ithread_handler() at ithread_handler+0x1ba boot() called on cpu#0 --- sys/bus/cam/cam_xpt.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/sys/bus/cam/cam_xpt.c b/sys/bus/cam/cam_xpt.c index f62f51f..a3b5651 100644 --- a/sys/bus/cam/cam_xpt.c +++ b/sys/bus/cam/cam_xpt.c @@ -4406,9 +4406,7 @@ again: /* * Make sure all completed CCBs are processed. */ - while (!TAILQ_EMPTY(&ccbsim->sim_doneq)) { - camisr_runqueue(ccbsim); - } + camisr_runqueue(ccbsim); /* * Check for requeues, reissues asyncs if necessary -- 1.7.4.1