WSL2-Linux-Kernel/drivers/acpi/acpica
Erik Kaneda 32cf1a12ca ACPICA: Interpreter: fix memory leak by using existing buffer
ACPICA commit 52d1da5dcbd79a722b70f02a1a83f04088f51ff6

There was a memory leak that ocurred when a _CID object is defined as
a package containing string objects. When _CID is checked for any
possible repairs, it calls a helper function to repair _HID (because
_CID basically contains multiple _HID entries).

The _HID repair function assumes that string objects are standalone
objects that are not contained inside of any packages. The _HID
repair function replaces the string object with a brand new object
and attempts to delete the old object by decrementing the reference
count of the old object. Strings inside of packages have a reference
count of 2 so the _HID repair function leaves this object in a
dangling state and causes a memory leak.

Instead of allocating a brand new object and removing the old object,
use the existing object when repairing the _HID object.

Link: https://github.com/acpica/acpica/commit/52d1da5d
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-12-01 18:13:30 +01:00
..
Makefile ACPICA: Remove PCI bits from ACPICA when CONFIG_PCI is unset 2018-12-20 10:19:49 +01:00
acapps.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
accommon.h ACPICA: Remove extreaneous "the" in comments 2020-12-01 18:13:30 +01:00
acconvert.h ACPICA: ASL-ASL+ converter: make root file a parameter for cv_init_file_tree 2020-02-16 10:19:51 +01:00
acdebug.h ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
acdispat.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acevents.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acglobal.h ACPICA: Add support for using logical addresses of GPE blocks 2020-09-11 16:44:45 +02:00
achware.h ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
acinterp.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
aclocal.h ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
acmacros.h ACPICA: ASL-ASL+ converter: make root file a parameter for cv_init_file_tree 2020-02-16 10:19:51 +01:00
acnamesp.h ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
acobject.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acopcode.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acparser.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acpredef.h ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
acresrc.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acstruct.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
actables.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acutils.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
amlcode.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
amlresrc.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dbcmds.c
dbconvert.c ACPICA: debugger: remove leading whitespaces when converting a string to a buffer 2019-10-28 22:12:46 +01:00
dbdisply.c ACPICA: iASL: add new OperationRegion subtype keyword PlatformRtMechanism 2020-06-05 13:34:23 +02:00
dbexec.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbfileio.c ACPICA: make acpi_load_table() return table index 2019-10-28 22:12:46 +01:00
dbhistry.c ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h 2020-05-09 10:55:53 +02:00
dbinput.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbmethod.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbnames.c ACPICA: debugger: surround field unit output with braces '{' 2019-10-28 22:12:46 +01:00
dbobject.c ACPICA: Results from Clang 2019-10-28 22:12:46 +01:00
dbstats.c ACPICA: Fully deploy ACPI_PRINTF_LIKE macro 2019-08-21 00:00:37 +02:00
dbtest.c ACPICA: Debugger: Fix possible fault with the "test objects" command 2019-02-18 11:21:10 +01:00
dbutils.c
dbxface.c ACPICA: acpiexec: remove redeclaration of acpi_gbl_db_opt_no_region_support 2020-03-30 14:52:32 +02:00
dsargs.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dscontrol.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsfield.c ACPICA: Dispatcher: add status checks 2020-05-09 10:55:54 +02:00
dsinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsmethod.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsmthdat.c
dsobject.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsopcode.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dspkginit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsutils.c ACPICA: Remove defines that use deprecated flag 2018-12-13 22:40:51 +01:00
dswexec.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswload.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswload2.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswscope.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dswstate.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evevent.c Merge branch 'acpica' 2020-03-30 14:53:36 +02:00
evglock.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evgpe.c ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write() 2020-09-04 19:34:15 +02:00
evgpeblk.c ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
evgpeinit.c ACPICA: Add support for using logical addresses of GPE blocks 2020-09-11 16:44:45 +02:00
evgpeutil.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evhandler.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evmisc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evregion.c ACPICA: Also handle "orphan" _REG methods for GPIO OpRegions 2020-12-01 18:13:30 +01:00
evrgnini.c ACPICA: Preserve memory opregion mappings 2020-07-27 12:29:02 +02:00
evsci.c
evxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evxfevnt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evxfgpe.c ACPICA: Allow acpi_any_gpe_status_set() to skip one GPE 2020-03-25 12:57:27 +01:00
evxfregn.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exconcat.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exconfig.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exconvrt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
excreate.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exdump.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exfield.c ACPICA: Make acpi_protocol_lengths static 2020-05-09 10:55:53 +02:00
exfldio.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exmisc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exmutex.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exnames.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg1.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg2.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg3.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg6.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exprep.c ACPICA: Do not increment operation_region reference counts for field units 2020-07-27 14:55:42 +02:00
exregion.c ACPICA: Preserve memory opregion mappings 2020-07-27 12:29:02 +02:00
exresnte.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exresolv.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exresop.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exserial.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstore.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstoren.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstorob.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exsystem.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
extrace.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwacpi.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwesleep.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwgpe.c ACPICA: Add missing type casts in GPE register access code 2020-10-19 14:46:39 +02:00
hwpci.c
hwregs.c ACPICA: ACPICA: add status check for acpi_hw_read before assigning return value 2018-08-14 23:49:13 +02:00
hwsleep.c ACPICA: Enable sleep button on ACPI legacy wake 2020-02-16 10:19:52 +01:00
hwtimer.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwvalid.c ACPICA: Validate GPE blocks at init time 2020-09-04 19:33:54 +02:00
hwxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwxfsleep.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsaccess.c ACPICA: Fully deploy ACPI_PRINTF_LIKE macro 2019-08-21 00:00:37 +02:00
nsalloc.c ACPICA: Remove unnecessary semicolon 2020-10-08 18:03:56 +02:00
nsarguments.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
nsconvert.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsdump.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsdumpdv.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nseval.c ACPICA: remove legacy module-level code due to deprecation 2019-07-04 00:59:43 +02:00
nsinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsload.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsnames.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
nsobject.c ACPICA: Namespace: remove address node from global list after method termination 2019-04-09 10:05:11 +02:00
nsparse.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nspredef.c ACPICA: Add function trace macros to improve debugging 2020-12-01 18:13:30 +01:00
nsprepkg.c ACPICA: Add function trace macros to improve debugging 2020-12-01 18:13:30 +01:00
nsrepair.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsrepair2.c ACPICA: Interpreter: fix memory leak by using existing buffer 2020-12-01 18:13:30 +01:00
nssearch.c ACPICA: Revert "iASL: change processing of external op namespace nodes for correctness" 2018-07-09 11:14:45 +02:00
nsutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nswalk.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsxfeval.c
nsxfname.c ACPICA: cast the result of the pointer difference to u32 2020-02-16 10:19:53 +01:00
nsxfobj.c ACPICA: Tree-wide: fix various typos and spelling mistakes 2020-10-08 18:03:55 +02:00
psargs.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psloop.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psobject.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psopcode.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psopinfo.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psparse.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
psscope.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
pstree.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
pswalk.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
rsaddr.c
rscalc.c
rscreate.c ACPICA: More Clang changes 2019-10-28 22:12:46 +01:00
rsdump.c
rsdumpinfo.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsinfo.c
rsio.c
rsirq.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rslist.c
rsmemory.c
rsmisc.c
rsserial.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsutils.c
rsxface.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
tbdata.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbfadt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbfind.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbinstal.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbprint.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbxface.c ACPICA: Table Manager: Update comments in a function header 2020-02-16 10:19:52 +01:00
tbxfload.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbxfroot.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utaddress.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utalloc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utascii.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utbuffer.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utcache.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utcopy.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utdecode.c ACPICA: iASL: add new OperationRegion subtype keyword PlatformRtMechanism 2020-06-05 13:34:23 +02:00
utdelete.c ACPICA: Do not increment operation_region reference counts for field units 2020-07-27 14:55:42 +02:00
uterror.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
uteval.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utexcep.c
utglobal.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
uthex.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utids.c ACPICA: Replace one-element array with flexible-array 2020-07-27 14:55:42 +02:00
utinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utlock.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utmath.c
utmisc.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
utmutex.c
utnonansi.c
utobject.c ACPICA: Fix a couple of typos 2020-02-16 10:19:53 +01:00
utosi.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utownerid.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
utpredef.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
utprint.c ACPICA: utilities: fix sprintf() 2020-03-30 14:52:32 +02:00
utresdecode.c
utresrc.c
utstate.c
utstring.c ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
utstrsuppt.c ACPICA: iASL: Return exceptions for string-to-integer conversions 2020-10-08 18:03:55 +02:00
utstrtoul64.c ACPICA: Utilities: split hex detection into smaller functions 2018-08-14 23:49:13 +02:00
uttrack.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utuuid.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxferror.c ACPICA: Convert more ACPI errors to firmware errors 2019-01-15 18:04:02 +01:00
utxfinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxfmutex.c