linux/drivers/acpi
Lin Ming a5fe1a03f7 ACPICA: fix leak of acpi_os_validate_address
http://bugzilla.kernel.org/show_bug.cgi?id=13620

If the dynamic region is created and added to resource list over and over again,
it has the potential to be a memory leak by growing the list every time.

This patch fixes the memory leak, as below

1) add a new field "count" to struct acpi_res_list.

   When inserting, if the region(addr, len) is already in the resource
   list, we just increase "count", otherwise, the region is inserted
   with count=1.

   When deleting, the "count" is decreased, if it's decreased to 0,
   the region is deleted from the resource list.

   With "count", the region with same address and length can only be
   inserted to the resource list once, so prevent potential memory leak.

2) add a new function acpi_os_invalidate_address, which is called when
   region is deleted.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-27 13:10:35 -04:00
..
acpica ACPICA: fix leak of acpi_os_validate_address 2009-08-27 13:10:35 -04:00
ac.c ACPI: ac: use .notify method instead of installing handler directly 2009-06-18 00:13:14 -04:00
acpi_memhotplug.c ACPI: Ingore the memory block with zero block size in course of memory hotplug 2009-08-02 12:25:12 -04:00
battery.c ACPI: battery: fix CONFIG_ACPI_PROCFS_POWER=n build warning 2009-06-18 00:38:27 -04:00
blacklist.c ACPI: DMI to disable Vista compatibility on some Sony laptops 2009-06-23 23:32:47 -04:00
bus.c ACPI: use handle, not device, in system notification path 2009-06-18 00:13:15 -04:00
button.c ACPI: button: remove control method/fixed hardware distinctions 2009-04-11 00:36:41 -04:00
cm_sbs.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
container.c ACPI: add missing KERN_* constants to printks 2009-02-07 00:29:32 -05:00
debug.c Merge branch 'acpi-modparam' into release 2009-04-05 01:45:50 -04:00
dock.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
ec.c ACPI: EC: Fix ACPI EC resume non-query interrupt message 2009-04-23 23:56:57 -04:00
event.c netlink: change return-value logic of netlink_broadcast() 2009-02-05 23:56:36 -08:00
fan.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
glue.c ACPI: kill acpi_get_physical_pci_device() 2009-06-17 23:32:24 -04:00
internal.h ACPI: call acpi_wakeup_device_init() explicitly rather than as initcall 2009-03-27 12:51:31 -04:00
Kconfig PCI: drivers/pci/slot.c should depend on CONFIG_SYSFS 2009-06-18 13:57:24 -07:00
Makefile Merge branch 'async-battery' into release 2009-04-05 01:48:46 -04:00
numa.c x86, ACPI: add support for x2apic ACPI extensions 2009-04-03 20:08:12 -04:00
osl.c ACPICA: fix leak of acpi_os_validate_address 2009-08-27 13:10:35 -04:00
pci_bind.c ACPI: kill acpi_get_pci_id 2009-06-17 23:32:23 -04:00
pci_irq.c Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
pci_link.c ACPI: pci_link: simplify list of link devices 2009-03-17 01:53:29 -04:00
pci_root.c ACPI: video: prevent NULL deref in acpi_get_pci_dev() 2009-06-26 00:23:42 -04:00
pci_slot.c PCI: pci_slot: grab refcount on slot's bus 2009-04-06 11:31:14 -07:00
power.c ACPI: don't check power state after _ON/_OFF 2009-05-27 21:45:53 -04:00
proc.c ACPI: convert acpi_device_lock spinlock to mutex 2009-04-07 00:02:40 -04:00
processor_core.c Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
processor_idle.c Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
processor_perflib.c ACPI: sanity check _PSS frequency to prevent cpufreq crash 2009-05-29 20:45:58 -04:00
processor_thermal.c Merge branch 'constify' into release 2009-04-05 01:51:16 -04:00
processor_throttling.c ACPI processor: remove spurious newline from warning message 2009-05-29 21:26:26 -04:00
reboot.c ACPI: reboot.c: use new acpi_reset interface 2008-12-31 01:15:00 -05:00
sbs.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
sbshc.c ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
sbshc.h ACPI: SBS: Ignore alarms coming from unknown devices 2007-12-14 15:14:06 -05:00
scan.c Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
sleep.c PM / ACPI: HP G7000 Notebook needs a SCI_EN resume quirk 2009-07-29 21:07:47 +02:00
sleep.h ACPI: convert acpi_device_lock spinlock to mutex 2009-04-07 00:02:40 -04:00
system.c ACPI: root-only read protection on /sys/firmware/acpi/tables/* 2009-08-02 11:26:43 -04:00
tables.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
thermal.c thermal: Fix polling frequency for systems without passive cooling 2009-04-18 01:05:23 -04:00
utils.c ACPI: scheduling in atomic via acpi_evaluate_integer () 2008-11-26 17:39:06 -05:00
video.c Merge branches 'acerhdf', 'acpi-pci-bind', 'bjorn-pci-root', 'bugzilla-12904', 'bugzilla-13121', 'bugzilla-13396', 'bugzilla-13533', 'bugzilla-13612', 'c3_lock', 'hid-cleanups', 'misc-2.6.31', 'pdc-leak-fix', 'pnpacpi', 'power_nocheck', 'thinkpad_acpi', 'video' and 'wmi' into release 2009-06-24 01:19:50 -04:00
video_detect.c ACPI: video: convert to acpi_get_pci_dev 2009-06-17 23:32:23 -04:00
wakeup.c ACPI: convert acpi_device_lock spinlock to mutex 2009-04-07 00:02:40 -04:00