summaryrefslogtreecommitdiff
path: root/lib/refcount.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2019-01-09 06:50:18 +0300
committerJiri Kosina <jkosina@suse.cz>2019-01-10 09:08:18 +0300
commitee46967fc6e74d412fe1ec15f77fdb8624bde2b0 (patch)
tree586d3468d91b7059e2f8e9b200c95894501cd4a6 /lib/refcount.c
parentcf26057a9441173ad552e90cea3344607075c9ad (diff)
downloadlinux-ee46967fc6e74d412fe1ec15f77fdb8624bde2b0.tar.xz
HID: core: replace the collection tree pointers with indices
Previously, the pointer to the parent collection was stored. If a device exceeds 16 collections (HID_DEFAULT_NUM_COLLECTIONS), the array to store the collections is reallocated, the pointer to the parent collection becomes invalid. Replace the pointers with an index-based lookup into the collections array. Fixes: c53431eb696f3c ("HID: core: store the collections as a basic tree") Reported-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Kyle Pelton <kyle.d.pelton@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'lib/refcount.c')
0 files changed, 0 insertions, 0 deletions