]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: Fix mmap without buffer preallocation
authorTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 09:27:32 +0000 (11:27 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Jul 2021 09:28:33 +0000 (11:28 +0200)
commiteebc239ce2ab77cc98ded835b353464c11f9f8a0
tree2aaaa293a5c9cc4f7160375344217c91c2cbfce9
parentfee9f2d44c344e0e193333da42f456fa812bdaee
ALSA: pcm: Fix mmap without buffer preallocation

The recent rewrite of the memory allocation helpers also changed the
page extraction to a common helper, snd_sgbuf_get_page().  But this
assumes implicitly that the buffer was allocated via the standard
helper (usually via preallocation), and didn't consider the case of
the manual buffer handling.

This patch fixes it and also covers the manual buffer management.

Fixes: 5665d92abd1b ("ALSA: core: Abstract memory alloc helpers")
Link: https://lore.kernel.org/r/20210720092732.12412-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_native.c