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 71090376EC; Sun, 1 Sep 2024 17:08:14 +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=1725210494; cv=none; b=HzzTQXHMxOWt7vLu+LTQzPd7oKB0rz9/ko5mS7Qeg7etVZjaGXC7nHfJBLDxqHxHii0iJFHEkwtuRyHws9Y0QaJb8RMsAySRlZcO4MBnOE19p0BsEEI+HH3BNi4LHYsMr7G/VTHW2T5/WwdaNlmdSFWaQ+mPezvorNFrjEVhy3s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725210494; c=relaxed/simple; bh=OF8SGl71r+jfyaDH9ycJe12u2tgT1ZTCSAy7hfz38QY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y/dznEJiX6GBqfqaw/xAyOj1lRZXQDQV9fRbAlB1O0VYBinf98wzUtpoHA9QON9ZFz0plZ6Ca0Ro6rDV+N3OiP9DxnQFEpurnVI3tQDD4z5usSPGS1LwYMDhQ4N5Otl4vIxmVHRRtWR/QkLjIizGrDM/FWGBlO8Si+9HBrEwqIk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FnWA5YL1; 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="FnWA5YL1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0DCBC4CEC3; Sun, 1 Sep 2024 17:08:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725210494; bh=OF8SGl71r+jfyaDH9ycJe12u2tgT1ZTCSAy7hfz38QY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FnWA5YL1td8KCRdHhIG4kvYgYNkuUkKjnf1yPZ1fkN74/27Avsum8x50vOZhUGYRo YnY3YYxDTpCcOgGuZK9zxtWvUOrVGRPeW/EnfhCyglczv/6K2M+wtpTvt+qzhxA4ZS ptTnwXxRGc8prB9vwyby9Mw+zN+oCwyCDrb+5o0M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jesse Zhang , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher , Sasha Levin , Vamsi Krishna Brahmajosyula Subject: [PATCH 5.15 175/215] drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc Date: Sun, 1 Sep 2024 18:18:07 +0200 Message-ID: <20240901160829.977211556@linuxfoundation.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901160823.230213148@linuxfoundation.org> References: <20240901160823.230213148@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 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jesse Zhang commit 88a9a467c548d0b3c7761b4fd54a68e70f9c0944 upstream. Initialize the size before calling amdgpu_vce_cs_reloc, such as case 0x03000001. V2: To really improve the handling we would actually need to have a separate value of 0xffffffff.(Christian) Signed-off-by: Jesse Zhang Suggested-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin Signed-off-by: Vamsi Krishna Brahmajosyula Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c @@ -733,7 +733,8 @@ int amdgpu_vce_ring_parse_cs(struct amdg uint32_t created = 0; uint32_t allocated = 0; uint32_t tmp, handle = 0; - uint32_t *size = &tmp; + uint32_t dummy = 0xffffffff; + uint32_t *size = &dummy; unsigned idx; int i, r = 0;