From: Matthew Brost <matthew.brost@intel.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Matt Roper <matthew.d.roper@intel.com>,
kernel-janitors@vger.kernel.org, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Lucas De Marchi <lucas.demarchi@intel.com>,
linux-kernel@vger.kernel.org, Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@gmail.com>,
intel-xe@lists.freedesktop.org, Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [PATCH] drm/xe/selftests: Fix an error pointer dereference bug
Date: Fri, 5 Jan 2024 20:25:11 +0000 [thread overview]
Message-ID: <ZZhlp4NXToubg+PJ@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <5c0db456-2d8a-485f-875d-6408386fcaa5@moroto.mountain>
On Fri, Jan 05, 2024 at 03:20:35PM +0300, Dan Carpenter wrote:
> Check if "bo" is an error pointer before calling xe_bo_lock() on it.
>
> Fixes: d6abc18d6693 ("drm/xe/xe2: Modify xe_bo_test for system memory")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
> ---
> drivers/gpu/drm/xe/tests/xe_bo.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
> index 412b2e7ce40c..3436fd9cf2b2 100644
> --- a/drivers/gpu/drm/xe/tests/xe_bo.c
> +++ b/drivers/gpu/drm/xe/tests/xe_bo.c
> @@ -125,14 +125,13 @@ static void ccs_test_run_tile(struct xe_device *xe, struct xe_tile *tile,
>
> bo = xe_bo_create_user(xe, NULL, NULL, SZ_1M, DRM_XE_GEM_CPU_CACHING_WC,
> ttm_bo_type_device, bo_flags);
> -
> - xe_bo_lock(bo, false);
> -
> if (IS_ERR(bo)) {
> KUNIT_FAIL(test, "Failed to create bo.\n");
> return;
> }
>
> + xe_bo_lock(bo, false);
> +
> kunit_info(test, "Verifying that CCS data is cleared on creation.\n");
> ret = ccs_test_migrate(tile, bo, false, 0ULL, 0xdeadbeefdeadbeefULL,
> test);
> --
> 2.42.0
>
next prev parent reply other threads:[~2024-01-05 20:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 12:20 [PATCH] drm/xe/selftests: Fix an error pointer dereference bug Dan Carpenter
2024-01-05 20:25 ` Matthew Brost [this message]
2024-01-05 22:05 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-05 22:05 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-05 22:06 ` ✓ CI.KUnit: success " Patchwork
2024-01-05 22:14 ` ✓ CI.Build: " Patchwork
2024-01-05 22:14 ` ✓ CI.Hooks: " Patchwork
2024-01-05 22:15 ` ✓ CI.checksparse: " Patchwork
2024-01-05 22:51 ` ✓ CI.BAT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZZhlp4NXToubg+PJ@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=airlied@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=mripard@kernel.org \
--cc=nirmoy.das@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox