linux/sound
Russell King c9bd5e690a DMA-API: sound: fix dma mask handling in a lot of drivers
This code sequence is unsafe in modules:

static u64 mask = DMA_BIT_MASK(something);
...
	if (!dev->dma_mask)
		dev->dma_mask = &mask;

as if a module is reloaded, the mask will be pointing at the original
module's mask address, and this can lead to oopses.  Moreover, they
all follow this with:

	if (!dev->coherent_dma_mask)
		dev->coherent_dma_mask = mask;

where 'mask' is the same value as the statically defined mask, and this
bypasses the architecture's check on whether the DMA mask is possible.

Fix these issues by using the new dma_coerce_coherent_and_mask()
function.

Acked-by: Mark Brown <broonie@linaro.org>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2013-10-31 14:48:47 +00:00
..
aoa
arm DMA-API: sound: fix dma mask handling in a lot of drivers 2013-10-31 14:48:47 +00:00
atmel
core ASoC: Updates for v3.12 2013-08-23 14:12:22 +02:00
drivers ALSA: replace strict_strto*() with kstrto*() 2013-07-21 11:56:18 +02:00
firewire Merge branch 'for-3.12' into for-next 2013-07-15 12:09:28 +02:00
i2c [media] tea575x: Move from sound to media 2013-08-18 08:09:59 -03:00
isa Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus 2013-09-11 11:17:15 +01:00
mips
oss ASoC: Updates for v3.12 2013-08-23 14:12:22 +02:00
parisc
pci sound fixes for 3.12-rc1 2013-09-12 08:52:41 -07:00
pcmcia
ppc
sh
soc DMA-API: sound: fix dma mask handling in a lot of drivers 2013-10-31 14:48:47 +00:00
sparc
spi
synth
usb ASoC: Updates for v3.12 2013-08-23 14:12:22 +02:00
Kconfig
Makefile
ac97_bus.c
last.c
sound_core.c drivers: avoid format string in dev_set_name 2013-07-03 16:07:41 -07:00
sound_firmware.c