From: jsg Date: Fri, 11 Oct 2024 02:16:34 +0000 (+0000) Subject: drm/amd/display: fix double free issue during amdgpu module unload X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2d69c72d46c3a0cc948f4bd9477981e758b1860b;p=openbsd drm/amd/display: fix double free issue during amdgpu module unload From Tim Huang cf6f3ebd6312d465fee096d1f58089b177c7c67f in linux-6.6.y/6.6.55 20b5a8f9f4670a8503aa9fa95ca632e77c6bf55d in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/link/link_factory.c b/sys/dev/pci/drm/amd/display/dc/link/link_factory.c index 33bb96f770b..eb7c9f226af 100644 --- a/sys/dev/pci/drm/amd/display/dc/link/link_factory.c +++ b/sys/dev/pci/drm/amd/display/dc/link/link_factory.c @@ -403,7 +403,7 @@ static void link_destruct(struct dc_link *link) if (link->panel_cntl) link->panel_cntl->funcs->destroy(&link->panel_cntl); - if (link->link_enc) { + if (link->link_enc && !link->is_dig_mapping_flexible) { /* Update link encoder resource tracking variables. These are used for * the dynamic assignment of link encoders to streams. Virtual links * are not assigned encoder resources on creation.