]> git.baikalelectronics.ru Git - kernel.git/commit
acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length
authorRobert Moore <robert.moore@intel.com>
Sat, 2 May 2009 18:48:37 +0000 (11:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 2 May 2009 18:48:37 +0000 (11:48 -0700)
commit063e058ef7abaa2dca43037ec3ae18958b4e6fa5
treedbea9369911bb400a8f0d363a56f1156be994099
parent1a1265eecfaf92593506edad6a71f2e069a7da76
acpica: validate package element more carefully in acpi_rs_get_pci_routing_table_length

acpi_rs_get_pci_routing_table_length is not performing sufficient
validation on the package returned from _PRT.  It assumes a package of
packages and fails/faults if this is not the case.

We should validate each subpackage when extracted from the parent
package, and not accept objects of the wrong type, since that will just
cause the scanning to fail (likely with a kernel oops).

This can only happen with a serious BIOS bug, and is accompanied by a
warning something like this:

  ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [20090320]

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/acpi/acpica/rscalc.c