summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-03 13:43:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-12 13:20:54 +0200
commit4a830a37d37e5ab8334fb080a85ccd6dcb97c6cd (patch)
treecaf8f17dc0aab2584823d2a340610f14d7244a35 /arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
parent0658a4533576d2dc153595fe39e44525bcbe5c4e (diff)
ALSA: seq: Fix racy deletion of subscriber
commit 97367c97226aab8b298ada954ce12659ee3ad2a4 upstream. It turned out that the current implementation of the port subscription is racy. The subscription contains two linked lists, and we have to add to or delete from both lists. Since both connection and disconnection procedures perform the same order for those two lists (i.e. src list, then dest list), when a deletion happens during a connection procedure, the src list may be deleted before the dest list addition completes, and this may lead to a use-after-free or an Oops, even though the access to both lists are protected via mutex. The simple workaround for this race is to change the access order for the disconnection, namely, dest list, then src list. This assures that the connection has been established when disconnecting, and also the concurrent deletion can be avoided. Reported-and-tested-by: folkert <folkert@vanheusden.com> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210801182754.GP890690@belle.intranet.vanheusden.com Link: https://lore.kernel.org/r/20210803114312.2536-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi')
0 files changed, 0 insertions, 0 deletions