708d904451
The value of *tail should be the prod->tail not prod->head. After modification, it can record 'tail' so head/tail can be updated accordingly. Fixes: 664ff4b1729b ("ring: introduce peek style API") Signed-off-by: Feifei Wang <feifei.wang2@arm.com> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>