Skip to content

venus: fix an incorrect assert in vn_ring_write_buffer

Chia-I Wu requested to merge olv/mesa:venus-ring-assert into main

The ring code uses 32-bit unsigned integers and relies on that their overflow/underflow behavior is well-defined. When ring->shared.head is about to overflow and ring->cur has overflowed, this expression

ring->cur + size - vn_ring_load_head(ring)

used in the assert gives an incorrect result when size is 64-bit.

/cc @zzyiwei @ryanneph

Merge request reports

Loading