summaryrefslogtreecommitdiffstats
path: root/Documentation/locking/lockstat.txt
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2017-07-21 16:51:31 +0200
committerDavid S. Miller <davem@davemloft.net>2017-07-24 14:13:58 -0700
commite859afe1ee0c5ae981c55387ccd45eba258a7842 (patch)
treeb2c0df42a39c4458a782eace46523fe9fd95bdb5 /Documentation/locking/lockstat.txt
parent1d9b86de3776aa0e809745e5c9e272b79a7ac09b (diff)
downloadlinux-e859afe1ee0c5ae981c55387ccd45eba258a7842.tar.bz2
lib: test_rhashtable: fix for large entry counts
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 <mm@skelett.io> Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/locking/lockstat.txt')
0 files changed, 0 insertions, 0 deletions