2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00
linux-next/drivers/acpi/acpica
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
..
accommon.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acconfig.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acdebug.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acdispat.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acevents.h ACPICA: Simplify internal operation region interface 2009-05-27 00:35:51 -04:00
acglobal.h ACPICA: Remove unused global variables 2009-05-27 00:30:48 -04:00
achware.h ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
acinterp.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
aclocal.h ACPICA: Disable preservation of SCI enable bit (SCI_EN) 2009-05-27 00:41:34 -04:00
acmacros.h ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
acnamesp.h ACPICA: Simplify and optimize NsGetNextNode function 2009-05-27 00:35:50 -04:00
acobject.h Revert "ACPICA: Remove obsolete acpi_os_validate_address interface" 2009-07-27 18:42:38 -04:00
acopcode.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acparser.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acpredef.h ACPICA: Update comments in module header 2009-03-26 16:38:23 -04:00
acresrc.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
acstruct.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
actables.h ACPICA: Fix AcpiWalkNamespace race condition with table unload 2009-03-27 12:11:02 -04:00
acutils.h ACPICA: Fix AcpiWalkNamespace race condition with table unload 2009-03-27 12:11:02 -04:00
amlcode.h ACPICA: New: AcpiInstallMethod - install a single control method 2009-05-27 00:35:51 -04:00
amlresrc.h ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
dsfield.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
dsinit.c ACPICA: Fix AcpiWalkNamespace race condition with table unload 2009-03-27 12:11:02 -04:00
dsmethod.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
dsmthdat.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
dsobject.c ACPICA: Fix miscellaneous warnings under gcc 4+ 2009-05-27 00:30:49 -04:00
dsopcode.c Revert "ACPICA: Remove obsolete acpi_os_validate_address interface" 2009-07-27 18:42:38 -04:00
dsutils.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
dswexec.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
dswload.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
dswscope.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
dswstate.c ACPICA: Fix miscellaneous warnings under gcc 4+ 2009-05-27 00:30:49 -04:00
evevent.c ACPICA: Add manifest constants for bit register values 2009-03-27 12:11:01 -04:00
evgpe.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
evgpeblk.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
evmisc.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
evregion.c ACPICA: Simplify internal operation region interface 2009-05-27 00:35:51 -04:00
evrgnini.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
evsci.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
evxface.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
evxfevnt.c ACPICA: Miscellaneous lint changes 2009-05-27 00:30:49 -04:00
evxfregn.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
exconfig.c ACPICA: Simplify internal operation region interface 2009-05-27 00:35:51 -04:00
exconvrt.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
excreate.c ACPICA: New: AcpiInstallMethod - install a single control method 2009-05-27 00:35:51 -04:00
exdump.c ACPICA: New: AcpiInstallMethod - install a single control method 2009-05-27 00:35:51 -04:00
exfield.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exfldio.c Revert "ACPICA: Remove obsolete acpi_os_validate_address interface" 2009-07-27 18:42:38 -04:00
exmisc.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exmutex.c ACPICA: Fix allowable release order for ASL mutex objects 2009-05-27 00:32:24 -04:00
exnames.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
exoparg1.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exoparg2.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exoparg3.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exoparg6.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
exprep.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exregion.c ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
exresnte.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exresolv.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exresop.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exstore.c ACPICA: Fix DebugObject output for DdbHandle objects 2009-05-27 00:32:24 -04:00
exstoren.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
exstorob.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
exsystem.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
exutils.c ACPICA: Remove ACPI_GET_OBJECT_TYPE macro 2009-03-26 16:38:27 -04:00
hwacpi.c ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
hwgpe.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
hwregs.c ACPICA: Fix a few warnings for gcc 3.4.4 2009-05-27 00:30:48 -04:00
hwsleep.c ACPI: Disable _GTS and _BFS support by default 2009-04-17 23:32:20 -04:00
hwtimer.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
hwvalid.c Revert "ACPICA: delete check for AML access to port 0x81-83" 2009-04-24 00:32:52 -04:00
hwxface.c ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
Makefile ACPICA: use acpi.* modparam namespace 2009-05-07 15:24:31 -04:00
nsaccess.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nsalloc.c ACPICA: Simplify and optimize NsGetNextNode function 2009-05-27 00:35:50 -04:00
nsdump.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nsdumpdv.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
nseval.c ACPICA: Debug output: decrease verbosity of DB_INFO debug level 2009-03-26 16:38:29 -04:00
nsinit.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nsload.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nsnames.c ACPICA: Fix printf format warnings for 64-bit build 2009-05-27 00:30:49 -04:00
nsobject.c ACPICA: New: AcpiInstallMethod - install a single control method 2009-05-27 00:35:51 -04:00
nsparse.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nspredef.c ACPICA: Fix possible dereference of null pointer 2009-05-27 00:30:49 -04:00
nssearch.c ACPICA: Miscellaneous lint changes 2009-05-27 00:30:49 -04:00
nsutils.c ACPICA: Formatting update - no functional changes 2009-03-27 12:11:02 -04:00
nswalk.c ACPICA: Simplify and optimize NsGetNextNode function 2009-05-27 00:35:50 -04:00
nsxfeval.c hwmon: Add Asus ATK0110 support 2009-04-07 15:32:59 +02:00
nsxfname.c ACPICA: New: AcpiInstallMethod - install a single control method 2009-05-27 00:35:51 -04:00
nsxfobj.c ACPICA: Eliminate extra call to NsGetParentNode 2009-05-27 00:35:51 -04:00
psargs.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psloop.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psopcode.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psparse.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psscope.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
pstree.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psutils.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
pswalk.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
psxface.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsaddr.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rscalc.c ACPICA: Additional validation of _PRT packages (resource mgr) 2009-05-27 00:35:50 -04:00
rscreate.c ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entries 2009-04-11 00:57:21 -04:00
rsdump.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsinfo.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsio.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsirq.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rslist.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsmemory.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsmisc.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsutils.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
rsxface.c ACPICA: Fix miscellaneous warnings under gcc 4+ 2009-05-27 00:30:49 -04:00
tbfadt.c ACPICA: Miscellaneous lint changes 2009-05-27 00:30:49 -04:00
tbfind.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
tbinstal.c ACPICA: Miscellaneous lint changes 2009-05-27 00:30:49 -04:00
tbutils.c ACPICA: Update table header print function 2009-03-26 16:38:32 -04:00
tbxface.c Merge branch 'linus' into release 2009-04-05 02:14:15 -04:00
tbxfroot.c ACPICA: Formatting update - no functional changes 2009-03-26 16:38:29 -04:00
utalloc.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
utcopy.c ACPICA: Change behavior of object copy for mutex/event objects 2009-05-27 00:30:48 -04:00
utdebug.c ACPICA: Fix possible warnings for ACPI_THREAD_ID on 64-bit build 2009-05-27 00:30:48 -04:00
utdelete.c ACPICA: fix leak of acpi_os_validate_address 2009-08-27 13:10:35 -04:00
uteval.c ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
utglobal.c ACPICA: New: I/O port protection 2009-03-27 12:11:03 -04:00
utinit.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
utlock.c ACPICA: Fix AcpiWalkNamespace race condition with table unload 2009-03-27 12:11:02 -04:00
utmath.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
utmisc.c ACPICA: Update error/warning interfaces 2009-05-27 00:30:48 -04:00
utmutex.c ACPICA: Fix possible warnings for ACPI_THREAD_ID on 64-bit build 2009-05-27 00:30:48 -04:00
utobject.c ACPICA: Debug output: decrease verbosity of DB_INFO debug level 2009-03-26 16:38:29 -04:00
utresrc.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
utstate.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00
utxface.c ACPICA: hide private headers 2009-01-09 03:31:01 -05:00