Re: Emu10k1 driver update

From: Linus Torvalds (
Date: Tue Oct 09 2001 - 13:01:18 EST

On Tue, 9 Oct 2001, Rui Sousa wrote:
> Attached a patch for the emu10k1 kernel driver against 2.4.11pre6.

Applied. However..

> Changes:
> Mixer improvements.
> Fixed a dead lock in emu10k1_volxxx_irqhandler.

The locking still looks _very_ suspicious. The code seems to lock at all
the wrong places, leaving a lot of accesses completely outside any
locking. In particular, look at how the code in emu10k1_set_oss_vol()
(which was apparently the one involved in the irqhandler lockup) now does
not protect the mixer_state thing in _any_ way.

In general it is a bug to leave locking to the low-level routines, in this
case to "emu10k1_set_volume_gpr()". I realize that somebody went "Ugh, we
should try to make the locking regions as small as possible", but the fact
is, locks that are _too_ small are no better than no locks at all.

It may be that there is some good reason for why the mixer_state thing
doesn't need a lock - I only gave the patch a quick see-though, but if so
maybe a single line comment migth be appropriate.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:26 EST