vchiq_arm: Add completion records under the mutex
authorPhil Elwell <phil@raspberrypi.org>
Thu, 21 Apr 2016 12:49:32 +0000 (13:49 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 8 Oct 2017 00:59:58 +0000 (00:59 +0000)
commit53aaa0bfed8a7c69eb8a4d9732acde1b7cc4dd30
tree5a2b89172aaf780f88c5c541591423aafc2a5ad7
parentdb615196d1a73215cad00ca6d00cb63b9d743507
vchiq_arm: Add completion records under the mutex

An issue was observed when flushing openmax components
which generate a large number of messages returning
buffers to host.

We occasionally found a duplicate message from 16
messages prior, resulting in a buffer returned twice.

While only one thread adds completions, without the
mutex you don't get the protection of the automatic
memory barrier you get with synchronisation objects.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c