]> git.hungrycats.org Git - linux/commit
[PATCH] dmasound close timeout
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 25 Mar 2004 14:00:32 +0000 (06:00 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 25 Mar 2004 14:00:32 +0000 (06:00 -0800)
commit01472f19bb7fe25bf932ff286d1298e15d3c7093
treefdf14c84fcf94f3fe6976eadc7b2eededdf8a398
parent0d925852d640278ee9fa3f0fbda7f5aedebae0f0
[PATCH] dmasound close timeout

The dmasound driver occasionally hangs a process on exit.

Apparently there is a possible case where the sound HW stops draining
output samples and the driver waits forever in its release() callback.
It should check for signals(), but it seems signal_pending() never
returns 1 when the process is beeing killed (implicit release() of files
on exit).

This patch adds a safety timeout to the release() function to make sure
we can at least close the driver.  I'll try to find the reason we aren't
driving samples later, but it is better to have a safety just incase the
sound clock goes berserk for some reason.
sound/oss/dmasound/dmasound_core.c