]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: dmaengine: increment buffer pointer atomically
authorAndreas Pape <apape@de.adit-jv.com>
Mon, 26 Sep 2022 16:58:13 +0000 (18:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:30 +0000 (13:22 +0200)
commitaae229c5e81b585049ae94658773317b7c0a629a
tree781f4c5b6d5a7fcdb3ef2845f7de5b4c4dc3690d
parente176676534f278f7bbe92515b249fb45d148f6ac
ALSA: dmaengine: increment buffer pointer atomically

[ Upstream commit caee708a910de7de927b97b850c9db07dd196d8f ]

Setting pointer and afterwards checking for wraparound leads
to the possibility of returning the inconsistent pointer position.

This patch increments buffer pointer atomically to avoid this issue.

Fixes: 921a017b056cd7 ("ASoC: Add dmaengine PCM helper functions")
Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Link: https://lore.kernel.org/r/1664211493-11789-1-git-send-email-erosca@de.adit-jv.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/pcm_dmaengine.c