Re: [Qemu-devel] [PATCH v2 6/6] pvrdma: check return value from pvrdma_idx_ring_has_ routines

2018-12-12 Thread Yuval Shaia
On Thu, Dec 13, 2018 at 01:00:39AM +0530, P J P wrote: > From: Prasad J Pandit > > pvrdma_idx_ring_has_[data/space] routines also return invalid > index PVRDMA_INVALID_IDX[=-1], if ring has no data/space. Check > return value from these routines to avoid plausible infinite loops. > >

[Qemu-devel] [PATCH v2 6/6] pvrdma: check return value from pvrdma_idx_ring_has_ routines

2018-12-12 Thread P J P
From: Prasad J Pandit pvrdma_idx_ring_has_[data/space] routines also return invalid index PVRDMA_INVALID_IDX[=-1], if ring has no data/space. Check return value from these routines to avoid plausible infinite loops. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit ---