No description
Find a file
Zhipeng Lu 0c5d08b1c9 drm/amd/pm: fix a double-free in amdgpu_parse_extended_power_table
[ Upstream commit a658270117 ]

The amdgpu_free_extended_power_table is called in every error-handling
paths of amdgpu_parse_extended_power_table. However, after the following
call chain of returning:

amdgpu_parse_extended_power_table
  |-> kv_dpm_init / si_dpm_init
      (the only two caller of amdgpu_parse_extended_power_table)
        |-> kv_dpm_sw_init / si_dpm_sw_init
            (the only caller of kv_dpm_init / si_dpm_init, accordingly)
              |-> kv_dpm_fini / si_dpm_fini
                  (goto dpm_failed in xx_dpm_sw_init)
                    |-> amdgpu_free_extended_power_table

As above, the amdgpu_free_extended_power_table is called twice in this
returning chain and thus a double-free is triggered. Similarily, the
last kfree in amdgpu_parse_extended_power_table also cause a double free
with amdgpu_free_extended_power_table in kv_dpm_fini.

Fixes: 84176663e7 ("drm/amd/pm: create a new holder for those APIs used only by legacy ASICs(si/kv)")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:36 -08:00
arch ARM: davinci: always select CONFIG_CPU_ARM926T 2024-01-25 15:35:30 -08:00
block blk-cgroup: fix rcu lockdep warning in blkg_lookup() 2024-01-25 15:35:30 -08:00
certs
crypto
Documentation media: dt-bindings: media: rkisp1: Fix the port description for the parallel interface 2024-01-25 15:35:35 -08:00
drivers drm/amd/pm: fix a double-free in amdgpu_parse_extended_power_table 2024-01-25 15:35:36 -08:00
fs f2fs: fix to update iostat correctly in f2fs_filemap_fault() 2024-01-25 15:35:35 -08:00
include drm/bridge: Fix typo in post_disable() description 2024-01-25 15:35:32 -08:00
init
io_uring
ipc
kernel
lib
LICENSES
mm
net ip6_tunnel: fix NEXTHDR_FRAGMENT handling in ip6_tnl_parse_tlv_enc_lim() 2024-01-25 15:35:30 -08:00
rust
samples
scripts
security
sound ASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget 2024-01-25 15:35:34 -08:00
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.