]> git.baikalelectronics.ru Git - kernel.git/commit
ptr_ring: READ/WRITE_ONCE for __ptr_ring_empty
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Jan 2018 23:36:29 +0000 (01:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jan 2018 17:02:53 +0000 (12:02 -0500)
commit6afc22d1944be83518343a70fc90e94cd1d9a935
treea5a2c6d057c491dc2235cd443e1bf7a6823d74b2
parentd5218f714e8141c1d96a2ca6b4a304431ab97e9d
ptr_ring: READ/WRITE_ONCE for __ptr_ring_empty

Lockless __ptr_ring_empty requires that consumer head is read and
written at once, atomically. Annotate accordingly to make sure compiler
does it correctly.  Switch locked callers to __ptr_ring_peek which does
not support the lockless operation.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ptr_ring.h