Commit 5f4e3bbd authored by Linus Torvalds's avatar Linus Torvalds

acpi video device enumeration: fix incorrect device list allocation

It didn't allocate space for the final terminating entry,
which caused it to overwrite the next slab entry, which in turn
sometimes ended up being a slab array cache pointer. End result:
total slab cache corruption at a random time afterwards. Very
nasty.
parent 99dbd268
......@@ -1524,7 +1524,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
dod->package.count));
active_device_list= kmalloc(
dod->package.count*sizeof(struct acpi_video_enumerated_device),
(1+dod->package.count)*sizeof(struct acpi_video_enumerated_device),
GFP_KERNEL);
if (!active_device_list) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment