aboutsummaryrefslogtreecommitdiffstats
path: root/lib/pci_iomap.c
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 /lib/pci_iomap.c
parentMerge branch 'bpf-fix-verifier-min-max-handling-in-BPF_SUB' (diff)
downloadlinux-dev-e859afe1ee0c5ae981c55387ccd45eba258a7842.tar.xz
linux-dev-e859afe1ee0c5ae981c55387ccd45eba258a7842.zip
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 'lib/pci_iomap.c')
0 files changed, 0 insertions, 0 deletions