diff options
| author | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-01 19:45:13 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-01-01 19:45:13 -0800 |
| commit | 5f4e3bbdfb74c5dc527502e88671d51139a3683a (patch) | |
| tree | d4ed71b280c0eb04735bbb6064391053b62c9c88 | |
| parent | 99dbd2681ddcadbf30387397de81b96498feaeb4 (diff) | |
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.
| -rw-r--r-- | drivers/acpi/video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index cd73ae3ab90a..bd311c2076ac 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -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) { |
