]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
media: dvb_ringbuffer: Add memory barriers
authorSoeren Moch <smoch@web.de>
Wed, 11 May 2016 16:49:11 +0000 (13:49 -0300)
committerKamal Mostafa <kamal@canonical.com>
Mon, 22 Aug 2016 14:42:15 +0000 (07:42 -0700)
commit11cd999de6fa06a6926ccda570ca7006f9935d2f
tree0a89505b862a994a57b8b9d8cbb8633282903227
parent9935c9c2379e9ec76bf313af307688d5e90cb37f
media: dvb_ringbuffer: Add memory barriers

BugLink: http://bugs.launchpad.net/bugs/1615620
commit ca6e6126db5494f18c6c6615060d4d803b528bff upstream.

Implement memory barriers according to Documentation/circular-buffers.txt:
- use smp_store_release() to update ringbuffer read/write pointers
- use smp_load_acquire() to load write pointer on reader side
- use ACCESS_ONCE() to load read pointer on writer side

This fixes data stream corruptions observed e.g. on an ARM Cortex-A9
quad core system with different types (PCI, USB) of DVB tuners.

Signed-off-by: Soeren Moch <smoch@web.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
drivers/media/dvb-core/dvb_ringbuffer.c