]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: PCM: Fix NULL dereference at mmap checks
authorTakashi Iwai <tiwai@suse.de>
Sun, 7 Nov 2021 16:39:11 +0000 (17:39 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 7 Nov 2021 16:55:05 +0000 (17:55 +0100)
commitcfd4ee37dd3efe731a756bca704f589e872789e3
treed7bb2596181b3e1555715c762b233bf3bd3e55ca
parentc24ca670846d9d6e947cbe4b31fc99713fe76392
ALSA: PCM: Fix NULL dereference at mmap checks

The recent refactoring of mmap handling caused Oops on some devices
that don't use the standard memory allocations.  This patch addresses
it by allowing snd_dma_buffer_mmap() helper to receive the NULL
pointer dmab argument (and return an error appropriately).

Fixes: a9f080272a08 ("ALSA: core: Move mmap handler into memalloc ops")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20211107163911.13534-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/memalloc.c