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: [email protected]
>
> Signed-off-by: Yipeng Wang <[email protected]>
> Reported-by: Honnappa Nagarahalli <[email protected]>
> Reviewed-by: Honnappa Nagarahalli <[email protected]>
> Acked-by: Dharmik Thakkar <[email protected]>
> ---
Acked-by: Bruce Richardson <[email protected]>