]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: bebob: use address returned by kmalloc() instead of kernel stack for streaming...
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Sun, 9 Sep 2018 13:25:12 +0000 (22:25 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 10 Sep 2018 07:07:29 +0000 (09:07 +0200)
commit18745f0c9a6475d5829865ecfcbe65b9c1f19661
tree251f86c69bf92990195498855b89b71f188c7675
parent7898c28e170e0e4957276419b06cdf4b3968eb88
ALSA: bebob: use address returned by kmalloc() instead of kernel stack for streaming DMA mapping

When executing 'fw_run_transaction()' with 'TCODE_WRITE_BLOCK_REQUEST',
an address of 'payload' argument is used for streaming DMA mapping by
'firewire_ohci' module if 'size' argument is larger than 8 byte.
Although in this case the address should not be on kernel stack, current
implementation of ALSA bebob driver uses data in kernel stack for a cue
to boot M-Audio devices. This often brings unexpected result, especially
for a case of CONFIG_VMAP_STACK=y.

This commit fixes the bug.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=201021
Reference: https://forum.manjaro.org/t/firewire-m-audio-410-driver-wont-load-firmware/51165
Fixes: e0e7be8cad4f('ALSA: bebob: Send a cue to load firmware for M-Audio Firewire series')
Cc: <stable@vger.kernel.org> # v3.16+
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/bebob/bebob_maudio.c