Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: David Gwynne (dlgcvs.openbsd.org)
Date: Fri Apr 16 2010 - 04:51:30 CDT
Module name: src
Changes by: dlgcvs.openbsd.org 2010/04/16 03:51:30
sys/scsi : scsi_base.c scsiconf.h
fix an fatal flaw with iopools.
an xshandler gets put on a series of lists as it allocates different
resources, and uses the same tailq entry on each of these lists as
its only supposed to be on one of them at a time. however, it was
possible for the xshandler to be added to both at the same time,
therefore corrupting the lists and leading to a panic.
this diff moves from using separate flags for each queue an xshandler
could be on to having a single state variable that shows which one
it is on (or not on). this prevents an xshandler on the io runqueue
from being added to the openings runqueue, which in turn prevents
the list corruption.
some operations have been reordered to avoid races and complexity
in this little state machine.