···310310ABS_MT_TOOL_TYPE311311 The type of approaching tool. A lot of kernel drivers cannot distinguish312312 between different tool types, such as a finger or a pen. In such cases, the313313- event should be omitted. The protocol currently supports MT_TOOL_FINGER,314314- MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_. For type B devices, this event is315315- handled by input core; drivers should instead use316316- input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may change over317317- time while still touching the device, because the firmware may not be able318318- to determine which tool is being used when it first appears.313313+ event should be omitted. The protocol currently mainly supports314314+ MT_TOOL_FINGER, MT_TOOL_PEN, and MT_TOOL_PALM [#f2]_.315315+ For type B devices, this event is handled by input core; drivers should316316+ instead use input_mt_report_slot_state(). A contact's ABS_MT_TOOL_TYPE may317317+ change over time while still touching the device, because the firmware may318318+ not be able to determine which tool is being used when it first appears.319319320320ABS_MT_BLOB_ID321321 The BLOB_ID groups several packets together into one arbitrarily shaped
+14-3
drivers/hid/hid-core.c
···128128129129 usage = parser->local.usage[0];130130131131- if (parser->collection_stack_ptr == HID_COLLECTION_STACK_SIZE) {132132- hid_err(parser->device, "collection stack overflow\n");133133- return -EINVAL;131131+ if (parser->collection_stack_ptr == parser->collection_stack_size) {132132+ unsigned int *collection_stack;133133+ unsigned int new_size = parser->collection_stack_size +134134+ HID_COLLECTION_STACK_SIZE;135135+136136+ collection_stack = krealloc(parser->collection_stack,137137+ new_size * sizeof(unsigned int),138138+ GFP_KERNEL);139139+ if (!collection_stack)140140+ return -ENOMEM;141141+142142+ parser->collection_stack = collection_stack;143143+ parser->collection_stack_size = new_size;134144 }135145136146 if (parser->device->maxcollection == parser->device->collection_size) {···850840 break;851841 }852842843843+ kfree(parser->collection_stack);853844 vfree(parser);854845 return 0;855846}