ACPI: video_device_list corruption
commit8444021c69b0787dbe4dde1c4e15818ab4e42986
authorWilliam Lee Irwin III <wli@holomorphy.com>
Thu, 13 Dec 2007 21:29:16 +0000 (13 16:29 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 20:01:10 +0000 (8 12:01 -0800)
tree02aa06de786a1cb6c3e2c34439e014cef6fd76d8
parentb8d5ff3a2fc7f7d212a3edcf1d169e5be77ccaf4
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.

upstream commit 98934def70b48dac74fac3738b78ab2d1a28edda

Signed-off-by: William Irwin <wli@holomorphy.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/video.c