diff options
author | Ryan Seto <ryanseto@amd.com> | 2024-11-01 17:19:56 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-22 17:39:55 +0300 |
commit | 874ff59cde8fc525112dda26b501a1bac17dde9f (patch) | |
tree | ae21060729e771d58b572453be27ca8922a9b164 /scripts/generate_rust_analyzer.py | |
parent | 8e5f8857b80e05154f4c14386be6d4f6e9b558be (diff) | |
download | linux-874ff59cde8fc525112dda26b501a1bac17dde9f.tar.xz |
drm/amd/display: Handle dml allocation failure to avoid crash
commit 6825cb07b79ffeb1d90ffaa7a1227462cdca34ae upstream.
[Why]
In the case where a dml allocation fails for any reason, the
current state's dml contexts would no longer be valid. Then
subsequent calls dc_state_copy_internal would shallow copy
invalid memory and if the new state was released, a double
free would occur.
[How]
Reset dml pointers in new_state to NULL and avoid invalid
pointer
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Ryan Seto <ryanseto@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit bcafdc61529a48f6f06355d78eb41b3aeda5296c)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions