Michael S. Tsirkin
a8ceb5dbfd
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 >
2017-12-11 10:52:23 -05:00
..
2017-11-16 14:05:12 -08:00
2017-12-02 11:21:31 +00:00
2017-11-26 14:39:20 -08:00
2017-11-16 09:15:57 -08:00
2017-11-22 20:46:06 -10:00
2017-11-16 10:57:11 -08:00
2017-11-22 20:46:06 -10:00
2017-11-17 20:04:24 -08:00
2017-11-27 16:45:11 -05:00
2017-12-07 14:32:30 -05:00
2017-11-17 12:54:01 -08:00
2017-11-15 18:21:07 -08:00
2017-11-17 12:08:18 -08:00
2017-11-17 16:10:01 -08:00
2017-11-15 18:21:05 -08:00
2017-11-23 10:56:35 +01:00
2017-11-22 21:40:54 +01:00
2017-11-17 16:10:01 -08:00
2017-11-15 18:21:04 -08:00
2017-11-17 11:54:55 -08:00
2017-11-17 16:10:01 -08:00
2017-11-17 09:51:57 -08:00
2017-11-28 15:24:02 +01:00
2017-12-05 10:31:32 -08:00
2017-11-15 19:42:40 -08:00
2017-11-29 18:40:43 -08:00
2017-11-17 14:58:01 -08:00
2017-11-17 16:10:02 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:03 -08:00
2017-11-29 18:40:42 -08:00
2017-11-28 16:56:26 +01:00
2017-11-17 16:10:04 -08:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:05 -08:00
2017-11-17 09:51:57 -08:00
2017-11-17 16:10:01 -08:00
2017-11-17 16:10:04 -08:00
2017-12-04 20:51:12 +01:00
2017-11-29 10:30:13 -08:00
2017-11-15 18:21:01 -08:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:01 -08:00
2017-11-21 16:35:54 -08:00
2017-11-27 17:53:47 +01:00
2017-12-01 13:09:40 -08:00
2017-11-15 18:21:05 -08:00
2017-11-29 18:40:43 -08:00
2017-11-17 20:21:44 -08:00
2017-11-15 18:21:04 -08:00
2017-11-29 18:40:42 -08:00
2017-11-17 09:51:57 -08:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:07 -08:00
2017-11-15 18:21:04 -08:00
2017-11-24 01:37:35 +09:00
2017-11-24 01:37:35 +09:00
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2017-11-17 16:10:00 -08:00
2017-11-18 20:37:12 -05:00
2017-11-16 16:05:01 -08:00
2017-11-15 18:21:03 -08:00
2017-11-15 18:21:02 -08:00
2017-11-17 16:10:00 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:06 -08:00
2017-11-26 14:11:54 -08:00
2017-12-05 15:02:40 +01:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:04 -08:00
2017-11-17 16:10:03 -08:00
2017-11-21 05:28:13 -10:00
2017-12-11 10:52:23 -05:00
2017-11-17 20:14:10 -08:00
2017-11-17 16:10:01 -08:00
2017-12-05 18:06:09 -05:00
2017-11-17 16:10:04 -08:00
2017-11-15 18:21:04 -08:00
2017-11-15 20:42:10 -08:00
2017-11-21 09:25:01 +01:00
2017-11-28 16:00:50 +01:00
2017-11-15 20:42:10 -08:00
2017-11-30 09:15:53 -05:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-15 18:21:01 -08:00
2017-11-15 18:21:06 -08:00
2017-11-18 20:37:12 -05:00
2017-11-17 16:10:03 -08:00
2017-12-06 19:31:39 +01:00
2017-12-08 10:07:02 -05:00
2017-11-15 18:21:04 -08:00
2017-11-21 16:35:54 -08:00
2017-11-17 14:58:01 -08:00
2017-11-15 18:21:01 -08:00
2017-11-16 12:20:15 -08:00
2017-11-24 01:37:35 +09:00
2017-11-15 18:21:07 -08:00
2017-11-21 16:35:54 -08:00
2017-11-21 15:46:44 -08:00