Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98934def70b48dac74fac3738b78ab2d1a28edda
Commit:     98934def70b48dac74fac3738b78ab2d1a28edda
Parent:     da8cadb31b82c9d41fc593c8deab6aa20b162d6b
Author:     William Lee Irwin III <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 12 03:56:55 2007 -0800
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Thu Dec 13 16:24:10 2007 -0500

    ACPI: video_device_list corruption
    
    The ->cap fields of struct acpi_video_device and struct acpi_video_bus
    are 1B each, not 4B. The oversized memset()'s corrupted the subsequent
    list_head fields. This resulted in silent corruption without
    CONFIG_DEBUG_LIST and BUG's with it. This patch uses sizeof() to pass
    the proper bounds to the memset() calls and thereby correct the bugs.
    
    Signed-off-by: William Irwin <[EMAIL PROTECTED]>
    Acked-by: Mikael Pettersson <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/video.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 44a0d9b..bd77e81 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -577,7 +577,7 @@ static void acpi_video_device_find_cap(struct 
acpi_video_device *device)
        struct acpi_video_device_brightness *br = NULL;
 
 
-       memset(&device->cap, 0, 4);
+       memset(&device->cap, 0, sizeof(device->cap));
 
        if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_ADR", 
&h_dummy1))) {
                device->cap._ADR = 1;
@@ -697,7 +697,7 @@ static void acpi_video_bus_find_cap(struct acpi_video_bus 
*video)
 {
        acpi_handle h_dummy1;
 
-       memset(&video->cap, 0, 4);
+       memset(&video->cap, 0, sizeof(video->cap));
        if (ACPI_SUCCESS(acpi_get_handle(video->device->handle, "_DOS", 
&h_dummy1))) {
                video->cap._DOS = 1;
        }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to