From: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>,
Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>,
Tejas Upadhyay <tejas.upadhyay@intel.com>
Subject: [PATCH] drm/xe/ xe_sync: Check NULL before dereferencing
Date: Thu, 7 Dec 2023 04:00:27 +0530 [thread overview]
Message-ID: <20231206223027.46588-1-krishnaiah.bommu@intel.com> (raw)
checking null pointer before dereferencing schedule job
Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
drivers/gpu/drm/xe/xe_sync.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index 02c9577fe418..3b977061bf9f 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -255,6 +255,9 @@ void xe_sync_entry_signal(struct xe_sync_entry *sync, struct xe_sched_job *job,
dma_fence_put(fence);
}
} else if (sync->type == DRM_XE_SYNC_TYPE_USER_FENCE) {
+ if (!job)
+ drm_err(&sync->ufence->xe->drm, "No schedule job fond\n");
+
job->user_fence.used = true;
job->user_fence.addr = sync->addr;
job->user_fence.value = sync->timeline_value;
--
2.25.1
next reply other threads:[~2024-03-22 6:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 22:30 Bommu Krishnaiah [this message]
2024-03-22 8:28 ` ✓ CI.Patch_applied: success for drm/xe/ xe_sync: Check NULL before dereferencing Patchwork
2024-03-22 8:29 ` ✓ CI.checkpatch: " Patchwork
2024-03-22 8:29 ` ✓ CI.KUnit: " Patchwork
2024-03-22 8:36 ` [PATCH] " Nirmoy Das
2024-03-22 8:40 ` ✓ CI.Build: success for " Patchwork
2024-03-22 8:43 ` ✓ CI.Hooks: " Patchwork
2024-03-22 8:44 ` ✓ CI.checksparse: " Patchwork
2024-03-22 9:10 ` ✓ 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=20231206223027.46588-1-krishnaiah.bommu@intel.com \
--to=krishnaiah.bommu@intel.com \
--cc=himal.prasad.ghimiray@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=tejas.upadhyay@intel.com \
/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