From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 075B11D959B; Tue, 25 Mar 2025 12:28:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742905701; cv=none; b=qj3EFVjCxU4Rnfp4pmH2r9IcjrZsckxnrxwl5AucF21JLMdJhFzWmOyKDx8DNGvJmt0wQR4dENjqIzZ9p2ROHPMXUuICmhK2HUq8uo1Qa8ZL57yVY2RappLUWAC8MvJxdCEZrlpQqveXGeqQewvG61Gp0a5RihtcGFQzVlsDnzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742905701; c=relaxed/simple; bh=mj8cNU5tuPF8FGFNxogTJVNg8Bu2XGMNZsLh0tU+EbA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k6+yNkilApUsONhHcJ7ckBPsu3EsSH3TD4FCXa+HvWeyk5waCkHSFgEKoQBlBwOLZduEZ8K0OVNDs0Nr6hUdev8AXAV+DYJAHEfH51YUI2SdzifAvlrGEtWRwhOPSMG/e8eW/Xvp2xWxaCRJ9GSBZr/C+5ZQQg0VkwAVIT+BwH8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=IXmzn3Yd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="IXmzn3Yd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8F11C4CEE4; Tue, 25 Mar 2025 12:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1742905700; bh=mj8cNU5tuPF8FGFNxogTJVNg8Bu2XGMNZsLh0tU+EbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IXmzn3Ydp5TkpwS1eGl3TvifE7SiRs4jfwjmXmXACIDcOhQOeCr41w4qAn0PaaiOj GxtzUQ9mK5Xh+tXSl+eCsqxouytA0/7HuxabMGd8QeKhFyHDC8///Ca0R3QBg5RGYp ds0Y7tFoBam9a/ivy4aDqmFhp6y3Tq/FT3qcEPc4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alex Deucher , Alex Hung , Mario Limonciello , Tom Chung , Daniel Wheeler Subject: [PATCH 6.1 117/198] drm/amd/display: Fix slab-use-after-free on hdcp_work Date: Tue, 25 Mar 2025 08:21:19 -0400 Message-ID: <20250325122159.724143662@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250325122156.633329074@linuxfoundation.org> References: <20250325122156.633329074@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mario Limonciello commit e65e7bea220c3ce8c4c793b4ba35557f4994ab2b upstream. [Why] A slab-use-after-free is reported when HDCP is destroyed but the property_validate_dwork queue is still running. [How] Cancel the delayed work when destroying workqueue. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4006 Fixes: da3fd7ac0bcf ("drm/amd/display: Update CP property based on HW query") Cc: Alex Deucher Reviewed-by: Alex Hung Signed-off-by: Mario Limonciello Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher (cherry picked from commit 725a04ba5a95e89c89633d4322430cfbca7ce128) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c @@ -404,6 +404,7 @@ void hdcp_destroy(struct kobject *kobj, for (i = 0; i < hdcp_work->max_link; i++) { cancel_delayed_work_sync(&hdcp_work[i].callback_dwork); cancel_delayed_work_sync(&hdcp_work[i].watchdog_timer_dwork); + cancel_delayed_work_sync(&hdcp_work[i].property_validate_dwork); } sysfs_remove_bin_file(kobj, &hdcp_work[0].attr);