]> git.baikalelectronics.ru Git - kernel.git/commit
media: coda: fix deadlock between decoder picture run and start command
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 24 Oct 2019 10:32:11 +0000 (07:32 -0300)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 5 Nov 2019 11:59:19 +0000 (08:59 -0300)
commitc41b4e61b91228710a750fd5b7b1c4e8f2bb1ad0
tree81eddc4e4477dde83d4040cd812099dc470bb7a0
parentefdca33e48f7f08e8cea499b30b76b70c9803ec5
media: coda: fix deadlock between decoder picture run and start command

The BIT decoder picture run temporarily locks the bitstream mutex while
the coda device mutex is locked, to refill the bitstream ring buffer.
Consequently, the decoder start command, which locks both mutexes when
flushing the bitstream ring buffer, must lock the coda device mutex
first as well, to avoid an ABBA deadlock.

Fixes: 19b74b823938 ("media: coda: flush bitstream ring buffer on decoder restart")
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/coda/coda-common.c