]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: memalloc: Store snd_dma_buffer.addr for continuous pages, too
authorTakashi Iwai <tiwai@suse.de>
Wed, 4 Aug 2021 07:41:25 +0000 (09:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 4 Aug 2021 07:53:07 +0000 (09:53 +0200)
commitc812e8e3fd95c6cb1664de3b0b3c36cdba5a79d6
treecf2881e240976458d2e3733eb9c63e82e694468f
parent192fafd2ad22647693bb34643eda09a9dd7437b4
ALSA: memalloc: Store snd_dma_buffer.addr for continuous pages, too

In the recent fix commit a7d2bd4bc2c2 ("ALSA: memalloc: Fix regression
with SNDRV_DMA_TYPE_CONTINUOUS"), we replaced the pfn argument of the
remap_page_pfn() call from the uninitialized dmab->addr.  It was the
right fix, but it'd be more generic if we actually initialize
dmab->area for SNDRV_DMA_TYPE_CONTINOUS, too.  e.g. the field is used
in the common snd_sgbuf_get_addr(), too.

This patch adds the initialization of addr field and does revert of
the previous change to refer to it again in the mmap call.

Link: https://lore.kernel.org/r/20210804074125.8170-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/memalloc.c