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>
Sat, 31 Mar 2018 14:45:12 +0000 (15:45 +0100)
commitdcd3887a3c29f22e145d5519eaa8f0e0eb942d66
tree83f4642f34ed2ecd6cc369d195505b5a769978e4
parent2168eb5230e67d4eae8daad8928a74363fcbf662
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