summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-12-05 21:29:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-02 20:35:11 +0100
commit8b032bde28998122bd38cd9e7ee1e52cd15f4773 (patch)
tree453703557b03dd658edba883e37eb1e170170cbb /net/rds
parentb3b56038bab017847ac9e1c5610fc00567b51d00 (diff)
ptr_ring: add barriers
[ Upstream commit a8ceb5dbfde1092b466936bca0ff3be127ecf38e ] Users of ptr_ring expect that it's safe to give the data structure a pointer and have it be available to consumers, but that actually requires an smb_wmb or a stronger barrier. In absence of such barriers and on architectures that reorder writes, consumer might read an un=initialized value from an skb pointer stored in the skb array. This was observed causing crashes. To fix, add memory barriers. The barrier we use is a wmb, the assumption being that producers do not need to read the value so we do not need to order these reads. Reported-by: George Cherian <george.cherian@cavium.com> Suggested-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/rds')
0 files changed, 0 insertions, 0 deletions