From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 705BC606A332 for ; Fri, 4 Dec 2026 13:50:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=cOs4pJkf Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 102C210EBF8; Fri, 4 Dec 2026 13:49:56 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id A7E7010EBF8; Fri, 4 Dec 2026 13:49:49 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 4537C4169A; Fri, 4 Dec 2026 13:49:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BB6B1F000C2; Fri, 4 Dec 2026 13:49:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796392189; bh=21vr/lwDe2Nu/nB2wCbYUv9Q9BDwvoAD9a1/vMSlVzg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=cOs4pJkfLNzyNKDf5qCqoPDet8u1UinFGU1XRTACiTiyrAKAAodLtBv5c/3AxFTrb SgRumTv6xV1DYWIo4WkHos85N9qr1pzpxTL6e3hAVqvOSVSeEatlbDh3PDBNvBiWRR HejxIuk7/uS8lAigKQP3BuawXyvG1P5boZFBB8KfWCIpe3jocPJlBIs1tNDk/f4w2a 33V2XQxechT68/qa3J9z/p/hmzk2cfs5VijKKOKOtrfNqEFTu+XzXd6wpJOkuq8TnF zVV/duWMc/Q4RzkoUY+md6YbPFqrs07EUAO4kGUoELZKyECEfmkiLHM1GC1OG87o8N MVozuCPsNh2rg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/2] drm/i915/gvt: Fix potential GGTT leak on scratch tree failure To: "Tian Xuechen" <202300460064@mail.sdu.edu.cn> Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org In-Reply-To: <20261204133112.1953285-2-202300460064@mail.sdu.edu.cn> References: <20261204133112.1953285-1-202300460064@mail.sdu.edu.cn> <20261204133112.1953285-2-202300460064@mail.sdu.edu.cn> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 13:49:48 +0000 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "Intel-gfx" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] drm/i915/gvt: Fixes trailer cites wrong commit for intel_vgpu_init_gtt() -- commit 37afa0fbc147ef261c23b7fd66c1a3c2c27b4eb5 Author: Tian Xuechen <202300460064@mail.sdu.edu.cn> > drm/i915/gvt: Fix potential GGTT leak on scratch tree failure > > GGTT allocation precedes scratch page-tree creation. If the latter fails, > its local unwind releases only scratch pages, and the outer vGPU unwind > skips GTT cleanup because initialization did not succeed. > > Drop the newly created GGTT and clear its pointer on this failure. > > This issue was found by our static analysis tool under development. > > Fixes: 3b6411c2c205 ("drm/i915/gvt: implement scratch page table tree for= shadow PPGTT") > Signed-off-by: Tian Xuechen <202300460064@mail.sdu.edu.cn> [Severity: Low] Should the Fixes tag cite 19e6393fb536 ("drm/i915/gvt: do not ignore return value of create_scratch_page") instead? That commit introduced the gtt->ggtt_mm leak by changing intel_vgpu_init_gt= t() to return the error from create_scratch_page() without freeing gtt->ggtt_mm. Commit 3b6411c2c205 ("drm/i915/gvt: implement scratch page table tree for shadow PPGTT") only replaced create_scratch_page() with create_scratch_page_tree() on that existing error path. Fixes: 19e6393fb536 ("drm/i915/gvt: do not ignore return value of create_= scratch_page") --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204133112.1953= 285-1-202300460064@mail.sdu.edu.cn?part=3D1