On Mon, Oct 22, 2018 at 11:39:45AM -0700, Yipeng Wang wrote:
> In rte_hash_iterate, the reader lock did not protect the
> while loop which checks empty entry. This created a race
> condition that the entry may become empty when enters
> the lock, then a wrong key data value would be read out.
> 
> This commit reads out the position in the while condition,
> which makes sure that the position will not be changed
> to empty before entering the lock.
> 
> Fixes: f2e3001b53ec ("hash: support read/write concurrency")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Yipeng Wang <yipeng1.w...@intel.com>
> Reported-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
> Acked-by: Dharmik Thakkar <dharmik.thak...@arm.com>
> ---
Acked-by: Bruce Richardson <bruce.richard...@intel.com>

Reply via email to