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 DD13369D1C; Wed, 21 Feb 2024 13:18:17 +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=1708521498; cv=none; b=KGKqJW+bVRMzJBFoGFG1UewKTsG3Hbe91qEKNxmSB2QncOtvQzddOy5484F5eTZi6cwufCISB19QcFZ3rRBTgglGayqK7LADgLRF9HqZhIhSw7+CKmcH25icEkumM2CzEf0PqcNPeWTl5yZafVqi/mWSG5Coyr6oSB1aKT1fpNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708521498; c=relaxed/simple; bh=F9fwSlOaT5Q8DrJ9K7UziSRqMJLdBPxVEWBUZfh81iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U0wh80Bg7jr0J+k5Kf34Phfjucgkp19qgO8XIfe1ibQ2ZsZsY4864Zxp+dNkurxaZ1KDRdXmhGUDQ3c5GsnDr5y0MSqxaDW6KTKo3Lf3MKWqoBIZ32T1Gnz4Z8CR/6loKVAIkcp34Zb7XHGZtWScugistJgAGajDd4ExH8QLXxo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=G3zxedDg; 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="G3zxedDg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64EBEC433C7; Wed, 21 Feb 2024 13:18:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708521497; bh=F9fwSlOaT5Q8DrJ9K7UziSRqMJLdBPxVEWBUZfh81iw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G3zxedDgtw2llalnfoPU1GnphICvqHVuUM+d7mnYMlr6LhQ/trsT3IofybGmmt4dR SNKNqvUhmxLSpF+gluCknYPnTVP0dv8PwPedzbHkOtFa5hq5P/bc/STt+Xt6m5TkCB 2OW3W+OPpKMCLLeEffVQv1FVc6Ab8fWJS/YWS9S4= 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 4.19 128/202] drm/amdgpu: Release adev->pm.fw before return in amdgpu_device_need_post() Date: Wed, 21 Feb 2024 14:07:09 +0100 Message-ID: <20240221125935.846181620@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221125931.742034354@linuxfoundation.org> References: <20240221125931.742034354@linuxfoundation.org> User-Agent: quilt/0.67 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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4.19-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 c84f475d4f13..ae28f72c73ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -823,6 +823,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