summaryrefslogtreecommitdiff
path: root/usr.bin/shar
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2010-04-16 09:51:31 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2010-04-16 09:51:31 +0000
commit55da19205d6709cfb6a8ecaf2cb35851e01e2cbf (patch)
tree7269b2c959204e25ac9d4fdee7ebbaee5178e194 /usr.bin/shar
parent1dbed24dd6935562a1ae3ed70d6fc79975211edc (diff)
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.
Diffstat (limited to 'usr.bin/shar')
0 files changed, 0 insertions, 0 deletions