From: ratchov Date: Wed, 20 Aug 2008 14:22:50 +0000 (+0000) Subject: abuf_flush() must be called only from the ``xxx_in()'' routines (ie X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=82de4e1b5eda22581bb93252dc3341fb160bdb73;p=openbsd abuf_flush() must be called only from the ``xxx_in()'' routines (ie triggered by POLLIN condition). mix_pushzero() is not called from the ``xxx_in()'' chain, but calls abuf_flush() resulting in bad initialization of the mixer, which will lead to a deadlock at some point. ok jakemsr --- diff --git a/usr.bin/aucat/aproc.c b/usr.bin/aucat/aproc.c index 8fa5c7adfb4..fdace667490 100644 --- a/usr.bin/aucat/aproc.c +++ b/usr.bin/aucat/aproc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aproc.c,v 1.10 2008/08/14 09:58:55 ratchov Exp $ */ +/* $OpenBSD: aproc.c,v 1.11 2008/08/20 14:22:50 ratchov Exp $ */ /* * Copyright (c) 2008 Alexandre Ratchov * @@ -474,7 +474,7 @@ mix_pushzero(struct aproc *p) abuf_wcommit(obuf, obuf->mixtodo); obuf->mixtodo = 0; - abuf_flush(obuf); + abuf_run(obuf); mix_bzero(p); }