Commit c40619ee authored by Takashi Iwai's avatar Takashi Iwai Committed by Zheng Zengkai
Browse files

ALSA: pcm: Fix mmap breakage without explicit buffer setup

stable inclusion
from stable-5.10.59
commit 98c3fa3a9d7a2e405ad5a656793d0117bed00881
bugzilla: 176988 https://gitee.com/openeuler/kernel/issues/I4EAR4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=98c3fa3a9d7a2e405ad5a656793d0117bed00881



--------------------------------

commit dc0dc8a7 upstream.

The recent fix c4824ae7 ("ALSA: pcm: Fix mmap capability check")
restricts the mmap capability only to the drivers that properly set up
the buffers, but it caused a regression for a few drivers that manage
the buffer on its own way.

For those with UNKNOWN buffer type (i.e. the uninitialized / unused
substream->dma_buffer), just assume that the driver handles the mmap
properly and blindly trust the hardware info bit.

Fixes: c4824ae7 ("ALSA: pcm: Fix mmap capability check")
Reported-and-tested-by: default avatarJeff Woods <jwoods@fnordco.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/s5him0gpghv.wl-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent fdb7a2dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment