diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2008-04-08 17:41:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-08 18:25:53 -0700 |
commit | 4b47c971dc947cadecc20dc7681037e96ece520e (patch) | |
tree | 14afde1ea46a6b573ad1602e2ae440cb3f09ff1e /kernel/rwsem.c | |
parent | 41e3355de052693c7a0cad74b845148d262edadf (diff) | |
download | kernel_goldelico_gta04-4b47c971dc947cadecc20dc7681037e96ece520e.zip kernel_goldelico_gta04-4b47c971dc947cadecc20dc7681037e96ece520e.tar.gz kernel_goldelico_gta04-4b47c971dc947cadecc20dc7681037e96ece520e.tar.bz2 |
es1968: fix sleep-while-holding-lock bug
snd_es1968_ac97_read() calls snd_es1968_ac97_wait() first outside a locked
area, and later, while holding a lock.
snd_es1968_ac97_wait() has a polling loop with a cond_resched() inside it..
which sleeps, so the second call is invalid.
This patch adds a version of the wait function that just pure polls. While
this is not very elegant in principle, it's very likely the easiest thing to
do here, we already checked if the chip was ready (while yielding) just
before, so it is very unlikely to take a long time here.
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/rwsem.c')
0 files changed, 0 insertions, 0 deletions