On Mon, Jan 29, 2018 at 11:36:09AM +0800, Jason Wang wrote:
So __ptr_ring_empty doesn't really work lockless. It merely does not crash.
On 2018å01æ26æ 10:46, Michael S. Tsirkin wrote:
The problem is then API looks a little bit strange. Lockless were onlyOn 2018å01æ26æ 07:36, Michael S. Tsirkin wrote:lockless is tricky, and I'd rather not sprinkle READ/WRITE_ONCE where
Similar to bcecb4bbf88a ("net: ptr_ring: otherwise safe empty checks canIt looks to me that just fix this is better than disallow through doc (which
overrun array bounds") a lockless use of __ptr_ring_full might
cause an out of bounds access.
We can fix this, but it's easier to just disallow lockless
__ptr_ring_full for now.
is easily to be ignored ...).
Thanks
they aren't necessary.
allowed to be done at __ptr_ring_empty() but not __ptr_ring_full().
Thanks
I don't believe we can do anything to remove the need to read the
docs unless people use the safe non __ variants.