[PATCH] PCI: correctly allocate return buffers for osc calls
commit0cf72aa68c30845d4ac076909af4edd6e4cdaab9
authorKristen Accardi <kristen.c.accardi@intel.com>
Wed, 17 May 2006 18:13:37 +0000 (17 11:13 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 20 May 2006 22:00:31 +0000 (20 15:00 -0700)
tree696347c88e64b28cf2f3a197bfbc520989e976cd
parent3220ee4a7afa92cc7315f9f74b64bb8a7f9b1320
[PATCH] PCI: correctly allocate return buffers for osc calls

The OSC set and query functions do not allocate enough space for return values,
and set the output buffer length to a false, too large value.  This causes the
acpi-ca code to assume that the output buffer is larger than it actually is,
and overwrite memory when copying acpi return buffers into this caller provided
buffer.  In some cases this can cause kernel oops if the memory that is
overwritten is a pointer.  This patch will change these calls to use a
dynamically allocated output buffer, thus allowing the acpi-ca code to decide
how much space is needed.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/pci/pci-acpi.c