linux/sound
Clemens Ladisch b406e6103b ALSA: pcm: fix delta calculation at boundary wraparound
In the cleanup of the hw_ptr update functions in 2.6.33, the calculation
of the delta value was changed to use the modulo operator to protect
against a negative difference due to the pointer wrapping around at the
boundary.

However, the ptr variables are unsigned, so a negative difference would
result in the two complement's value which has no relation to the actual
difference relative to the boundary; the result is typically some value
near LONG_MAX-boundary.  Furthermore, even if the modulo operation would
be done with signed types, the result of a negative dividend could be
negative.

The invalid delta value is then caught by the following checks, but this
means that the pointer update is ignored.

To fix this, use a range check as in the other pointer calculations.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-25 20:23:48 +02:00
..
aoa include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
arm Merge remote branch 'alsa/devel' into topic/misc 2010-04-16 15:20:06 +02:00
atmel ALSA: AC97: add full duplex support for atmel AT91 and AVR. 2010-03-25 20:22:36 +01:00
core ALSA: pcm: fix delta calculation at boundary wraparound 2010-05-25 20:23:48 +02:00
drivers Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-05-20 09:41:44 -07:00
i2c Merge remote branch 'alsa/devel' into topic/misc 2010-04-16 15:20:06 +02:00
isa Merge branch 'topic/misc' into for-linus 2010-05-20 11:59:29 +02:00
mips include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
oss m68k: amiga - Sound platform device conversion 2010-05-17 21:37:44 +02:00
parisc ALSA: sound/parisc: Move dereference after NULL test 2009-10-30 12:01:38 +01:00
pci ALSA: aw2-alsa.c: use pci_ids.h defines and fix checkpatch.pl noise 2010-05-25 08:39:28 +02:00
pcmcia pcmcia: dev_node removal (write-only drivers) 2010-05-10 10:23:14 +02:00
ppc Merge remote branch 'alsa/devel' into topic/misc 2010-04-16 15:20:06 +02:00
sh include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
soc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 2010-05-20 09:41:44 -07:00
sparc include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
spi
synth include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
usb ALSA: usb/caiaq: fix Traktor Kontrol X1 ABS_HAT2X axis 2010-05-25 20:21:53 +02:00
ac97_bus.c
Kconfig tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
last.c
Makefile
sound_core.c ALSA: use subsys_initcall for sound core instead of module_init 2010-01-14 21:21:47 +01:00
sound_firmware.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00