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 08D82606A322 for ; Thu, 3 Dec 2026 18:08:39 +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=UvJa9fFY Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9E2A410E81F; Thu, 3 Dec 2026 18:08:33 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89FDC10E964 for ; Thu, 3 Dec 2026 18:08:27 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id B4E3F625A9; Thu, 3 Dec 2026 18:08:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B3101F000C1; Thu, 3 Dec 2026 18:08:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796321306; bh=B7LwpZJAl3MGO1zqmQAD/x/npR4sV2ME4xxryAhUW0g=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=UvJa9fFYVcu02UI2O/s0ZutKJnPJbEU0q0M24x4AXGM5Kto09p9SgyncrIqadx+Ou mA4Q/DblGeXi/HMSMCAFz772YRkLW1N18zXea4n2H92ipFFX2TJlAt44xnFYvhdxna jd+MlS1SDqFGH202Al6JNbP/cABNwhvFMY0EcoHhTgBPhAgRxW5RSz0OGcKJBsLTsV gMf8Fw6TEvqNTxerJU+Cgo7UO+HwbLTSzBdMoJR7HUy9Iro2zlLprDdhzzDNGkCFJK pe/qYMQzYAN1Z1Qe+PgF0CYsCp8PqV6EfQ4oIJlAz+1HEJJOwA1ervbVe3HbibwSXQ Djc99aZe2QQgQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v3] drm/i915/gem: Explicitly return error value from eb_relocate helpers To: "Jonathan Cavitt" , intel-gfx@lists.freedesktop.org In-Reply-To: <20261203165741.2928732-1-jonathan.cavitt@intel.com> References: <20261203165741.2928732-1-jonathan.cavitt@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 18:08:25 +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=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,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/gem: stale remain =3D -EFAULT in eb_relocate_vma() -- commit 6d5dcf84817706043cd50b98c302e38dfccdf3a7 Author: Jonathan Cavitt drm/i915/gem: Explicitly return error value from eb_relocate helpers This commit changes relocate_entry() and eb_relocate_entry() to return an int error code and pass the offset back through a u64 pointer argument. It updates eb_relocate_vma() and eb_relocate_vma_slow() to check the returned error directly instead of casting the offset to a signed type. > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu= /drm/i915/gem/i915_gem_execbuffer.c > index c41e1b9a40bca..d3272bf17bb04 100644 > --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c [ ... ] > @@ -1599,12 +1602,13 @@ static int eb_relocate_vma(struct i915_execbuffer= *eb, struct eb_vma *ev) > remain =3D -EFAULT; > goto out; > } > + err =3D 0; > } while (r++, --count); > urelocs +=3D ARRAY_SIZE(stack); > } while (remain); > out: > reloc_cache_reset(&eb->reloc_cache, eb); > - return remain; > + return err; > } [Severity: Low] Should remain =3D -EFAULT be updated now that the out label returns err instead of remain? Even though the put_user() error check is disabled with && 0, assigning -EFAULT to unsigned long remain is now a dead store and leaves the disabled error path inconsistent with the rest of eb_relocate_vma(). Reusing the outer err for put_user() also forces the manual err =3D 0 reset so a put_user() failure does not leak out of the loop. Keeping a separate local variable for put_user() and setting err =3D -EFAULT in the disabled branch would avoid both. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203165741.2928= 732-1-jonathan.cavitt@intel.com?part=3D1