mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
b088b53e20
The extra hw constraint rule for the formats the aloop driver
introduced has a slight flaw, where it doesn't return a positive value
when the mask got changed. It came from the fact that it's basically
a copy&paste from snd_hw_constraint_mask64(). The original code is
supposed to be a single-shot and it modifies the mask bits only once
and never after, while what we need for aloop is the dynamic hw rule
that limits the mask bits.
This difference results in the inconsistent state, as the hw_refine
doesn't apply the dependencies fully. The worse and surprisingly
result is that it causes a crash in OSS emulation when multiple
full-duplex reads/writes are performed concurrently (I leave why it
triggers Oops to readers as a homework).
For fixing this, replace a few open-codes with the standard
snd_mask_*() macros.
Reported-by: syzbot+3902b5220e8ca27889ca@syzkaller.appspotmail.com
Fixes:
|
||
---|---|---|
.. | ||
mpu401 | ||
opl3 | ||
opl4 | ||
pcsp | ||
vx | ||
aloop.c | ||
dummy.c | ||
Kconfig | ||
Makefile | ||
ml403-ac97cr.c | ||
mtpav.c | ||
mts64.c | ||
pcm-indirect2.c | ||
pcm-indirect2.h | ||
portman2x4.c | ||
serial-u16550.c | ||
virmidi.c |