summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2017-12-05 20:29:37 +0100
committerDavid S. Miller <davem@davemloft.net>2017-12-11 16:52:23 +0100
commita8ceb5dbfde1092b466936bca0ff3be127ecf38e (patch)
tree768483ddf27f70faa09ffe0f4a0c90a35119f249 /drivers/net
parentMerge tag 'mac80211-for-davem-2017-12-11' of git://git.kernel.org/pub/scm/lin... (diff)
downloadlinux-a8ceb5dbfde1092b466936bca0ff3be127ecf38e.tar.xz
linux-a8ceb5dbfde1092b466936bca0ff3be127ecf38e.zip
ptr_ring: add barriers
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>
Diffstat (limited to 'drivers/net')
0 files changed, 0 insertions, 0 deletions