From: Phil Sutter <p...@nwl.cc>
Date: Fri, 21 Jul 2017 16:51:31 +0200

> During concurrent access testing, threadfunc() concatenated thread ID
> and object index to create a unique key like so:
> 
> | tdata->objs[i].value = (tdata->id << 16) | i;
> 
> This breaks if a user passes an entries parameter of 64k or higher,
> since 'i' might use more than 16 bits then. Effectively, this will lead
> to duplicate keys in the table.
> 
> Fix the problem by introducing a struct holding object and thread ID and
> using that as key instead of a single integer type field.
> 
> Fixes: f4a3e90ba5739 ("rhashtable-test: extend to test concurrency")
> Reported by: Manuel Messner <m...@skelett.io>
> Signed-off-by: Phil Sutter <p...@nwl.cc>

Applied, thanks Phil.

Reply via email to