Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp783812rdb; Sun, 28 Jan 2024 08:46:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrL6gnKPssynPd5wuxakuJY76wLD6n9aPh0Aa2ld86YTmMWV78QhFrEMFstkVtXiiyK0gq X-Received: by 2002:a17:907:f95:b0:a26:f7ea:7cb6 with SMTP id kb21-20020a1709070f9500b00a26f7ea7cb6mr5014079ejc.16.1706460401642; Sun, 28 Jan 2024 08:46:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706460401; cv=pass; d=google.com; s=arc-20160816; b=k7Fp8UoKAhyE2zmCx/B4uYmmbgID/urh5P37IIC6NHKjR0//F6QUt9sl5nUHQFgwG3 bs+rpHyZ0AxPmsGsE2faEClQR9k/94FwMZqwSX1xFVpmKYS9mv6LUqET0+ozu8FHkRLj UtZ2CTq2nM2VUUWtw7CuHF3xDKYTYmOfr+Q+kve2SWJaMLBhWgfUs/8w0oqthwXTjGSl 6UbygIt4GhgFguDxSM7eB0T2qLXSCWAmMgUplc48ZzYx1s1TYAi2Sdq76Y5+3+UcCRbH OTmzBg+2GKrif0GIJQRR0FipgqxrEW/x1L9or6MO8QyLkyu47Z2bJuJ9pm97Zj0G/R1B Im3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ycmygRPZF2xvQu8wFFjWy8PBNdHGJMYbq1Xn5n/8F8M=; fh=l4XQlnWQNNysKBHz9LP/HSs1ns4vPj+GhsKK+DPgJQ0=; b=FT8L4oOBkNgh/fUshzdbmmc+tU822rhDmIkoiBZXnSUWd4bNXKAuFbziOe0JhbRT0W 0FkJH2ZW5VMDKfkZLaHvJUsBbbYCzIwfYO3ADzaqoIXFz9VuUPdgGQXCJ7ksC5J56ZKS g90vqE/PZJgANSznW1YL17YBC878KkLEZtbfuaXNUk0r8DNwLYe5ShdVCuA3LdRdPhFB uQ51LzlxRFe+jMDYOkOMtN9iVUn0c+lxXf4aRA1tZnR5fgQG8xl3pGZht9EFugm3bf2P mW5CGanCYc7PqEkzH4GRIUpmr0sfUJiVcTFqd5jaHSbgmJS9B4B524ullWYy5PMWslro OB2A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dSSrQ7FL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lz24-20020a170906fb1800b00a30f18765bdsi2633496ejb.5.2024.01.28.08.46.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jan 2024 08:46:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dSSrQ7FL; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-41780-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41780-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 98AD81F25EF7 for ; Sun, 28 Jan 2024 16:38:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9132E1292EF; Sun, 28 Jan 2024 16:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dSSrQ7FL" 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 B100F4C3BF; Sun, 28 Jan 2024 16:15:12 +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=1706458512; cv=none; b=Ln1WNl2VMtKVcqHCaZPaB4cuV5rGJ4LmBtokJQa8mLsn//h/xuyFPs00jUOSfXc/+oAOcgik+Pln8d93t654kvobcNdOGSuwUpU0JrbJ9hDh0MCLRNCTZZQ8P/xE5oJumaRKbCLnLDmcvlK5IW0yHSEUp20E/xO6vSTXDZhg8Do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706458512; c=relaxed/simple; bh=ZLEFwxCOTOF7EO6ou+YDVHqeyA9KKThtYa1MsczjO6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eBGBfkCLIIMs+1ccmUIMlI3s0rUWbm6v3Cr1Vao4OkqmPKXs1E+Atb97os/kKKYShOyyVzrCwcMMHoPZRHHDwtbxxKcJRo58FBQiR72FBpCsZ+vTYusPKZH5BRtwSnhuN63e2C1QKXNIEcL5Gh81m0Hca/r7z+BsUK57QEyJrJ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dSSrQ7FL; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44EC3C433F1; Sun, 28 Jan 2024 16:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706458512; bh=ZLEFwxCOTOF7EO6ou+YDVHqeyA9KKThtYa1MsczjO6k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSSrQ7FL+bgBxwghse5MGsL/X4wB3Daun+XJMCx6yOkQO2CvCflcRKqf5I/lOme0F L4MfF8iKo7y1OKKUhOC9jtRCvv4F8pQogRgQz6osjMEern+m6tsIwNJLl2+FGAHFkN OYbg/jo3daQm3NKokutSvKSe8+m4nqIQ6HLj2PVPeSNjXPzEmpwKUYnOdsRgtZcmmn F3/uqAkVHHgzBBaK75O06Cw+caJqZXUJqWDZG9F1XYKfYiPLHH1KlywVQWsg/ga8vU j3mQbUybvC6dvm6NdHnSnqbVl8DvM9TwfCLzOi4KTZw+4CaMK0XgQoSIzftOz02E9a KcxpxaHGG0VIQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Srinivasan Shanmugam , Monk Liu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Lijo Lazar , Sasha Levin , Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, Hawking.Zhang@amd.com, mario.limonciello@amd.com, candice.li@amd.com, le.ma@amd.com, victorchengchi.lu@amd.com, shashank.sharma@amd.com, andrealmeid@igalia.com, hamza.mahfooz@amd.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 6.1 25/27] drm/amdgpu: Release 'adev->pm.fw' before return in 'amdgpu_device_need_post()' Date: Sun, 28 Jan 2024 11:14:10 -0500 Message-ID: <20240128161424.203600-25-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240128161424.203600-1-sashal@kernel.org> References: <20240128161424.203600-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.1.75 Content-Transfer-Encoding: 8bit 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