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 9EF6BFC03; Sat, 3 Feb 2024 04:11:05 +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=1706933465; cv=none; b=OBrp++c+ZPSCxpPJULOGvyR/3rdF+wIvVgkTD5rJo61t9dvKnmOWRvaojgKjZ8b4wNw1dARQT2XW/e4Yt0T091hIwqsI/Xr5wOwYSluUSYRFFBb9wN8jXZUG+ELICTXucWOt8L6WpZ0k501UXjW1bn860q6JltTV9urhQW9HX5g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933465; c=relaxed/simple; bh=o6qh/jny8zembC91UflrNnnB9Pwe+o1T2aGFBR2qVck=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AUYYTuC/3gVvEXkvBDROkDuC+23FleDpEWLA5mKzIyjxlN5k+zw5Qqt0rqBcXNZIjPFFtHMZrknY4YlBRBpQkTSiyzOD3o2M/WEgtlUxBufjjrK9PVb0BiJbiDqbF/9Bsqxbky/WaGESBTkUDg4b/wmTDsarDzyBBTcZ56c/S68= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v7bu82gJ; 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="v7bu82gJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68C84C43394; Sat, 3 Feb 2024 04:11:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933465; bh=o6qh/jny8zembC91UflrNnnB9Pwe+o1T2aGFBR2qVck=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v7bu82gJOR+oN+qGKDxmWCIT2oDgP+rf1wxTK3l6if1o2U3lytChNveXWvrMKcqB7 DwxZ9tSu98oiglOMOwbkTnRP5FJ+Q+l2+IZ4D77pzi1EeZzGkmdT1SCUHI8QGB68tx 20zTMN5NFwVCcQMlwieaw2+6T6phrG45Lf7oGsEY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Monk Liu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Srinivasan Shanmugam , Lijo Lazar , Sasha Levin Subject: [PATCH 6.1 180/219] drm/amdgpu: Release adev->pm.fw before return in amdgpu_device_need_post() Date: Fri, 2 Feb 2024 20:05:53 -0800 Message-ID: <20240203035342.053992637@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035317.354186483@linuxfoundation.org> References: <20240203035317.354186483@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Srinivasan Shanmugam [ Upstream commit 8a44fdd3cf91debbd09b43bd2519ad2b2486ccf4 ] In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - 'adev->pm.fw' may not be released before return. Using the function release_firmware() to release adev->pm.fw. Thus fixing the below: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() warn: 'adev->pm.fw' from request_firmware() not released on lines: 1554. Cc: Monk Liu Cc: Christian König Cc: Alex Deucher Signed-off-by: Srinivasan Shanmugam Suggested-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a5352e5e2bd4..4b91f95066ec 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1310,6 +1310,7 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev) return true; fw_ver = *((uint32_t *)adev->pm.fw->data + 69); + release_firmware(adev->pm.fw); if (fw_ver < 0x00160e00) return true; } -- 2.43.0