From: Arvind Yadav <Arvind.Yadav@amd.com>
To: <Christian.Koenig@amd.com>, <andrey.grodzovsky@amd.com>,
<shashank.sharma@amd.com>, <amaranath.somalapuram@amd.com>,
<Arunpravin.PaneerSelvam@amd.com>, <sumit.semwal@linaro.org>,
<gustavo@padovan.org>, <airlied@linux.ie>, <daniel@ffwll.ch>,
<linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<linaro-mm-sig@lists.linaro.org>, <linux-kernel@vger.kernel.org>,
<steven.price@arm.com>
Cc: Arvind Yadav <Arvind.Yadav@amd.com>
Subject: [PATCH] drm/sched: Fix kernel NULL pointer dereference error
Date: Fri, 30 Sep 2022 14:18:10 +0530 [thread overview]
Message-ID: <20220930084810.4639-1-Arvind.Yadav@amd.com> (raw)
BUG: kernel NULL pointer dereference, address: 0000000000000088
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 2 PID: 0 Comm: swapper/2 Not tainted 6.0.0-rc2-custom #1
Arvind : [dma_fence_default_wait _START] timeout = -1
Hardware name: AMD Dibbler/Dibbler, BIOS RDB1107CC 09/26/2018
RIP: 0010:drm_sched_job_done.isra.0+0x11/0x140 [gpu_sched]
Code: 8b fe ff ff be 03 00 00 00 e8 7b da b7 e3 e9 d4 fe ff ff 66 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 41 55 41 54 49 89 fc 53 <48> 8b 9f 88 00 00 00 f0 ff 8b f0 00 00 00 48 8b 83 80 01 00 00 f0
RSP: 0018:ffffb1b1801d4d38 EFLAGS: 00010087
RAX: ffffffffc0aa48b0 RBX: ffffb1b1801d4d70 RCX: 0000000000000018
RDX: 000036c70afb7c1d RSI: ffff8a45ca413c60 RDI: 0000000000000000
RBP: ffffb1b1801d4d50 R08: 00000000000000b5 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffffb1b1801d4d70 R14: ffff8a45c4160000 R15: ffff8a45c416a708
FS: 0000000000000000(0000) GS:ffff8a48a0a80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000088 CR3: 000000014ad50000 CR4: 00000000003506e0
Call Trace:
<IRQ>
drm_sched_job_done_cb+0x12/0x20 [gpu_sched]
dma_fence_signal_timestamp_locked+0x7e/0x110
dma_fence_signal+0x31/0x60
amdgpu_fence_process+0xc4/0x140 [amdgpu]
gfx_v9_0_eop_irq+0x9d/0xd0 [amdgpu]
amdgpu_irq_dispatch+0xb7/0x210 [amdgpu]
amdgpu_ih_process+0x86/0x100 [amdgpu]
amdgpu_irq_handler+0x24/0x60 [amdgpu]
__handle_irq_event_percpu+0x4b/0x190
handle_irq_event_percpu+0x15/0x50
handle_irq_event+0x39/0x60
handle_edge_irq+0xaf/0x210
__common_interrupt+0x6e/0x110
common_interrupt+0xc1/0xe0
</IRQ>
<TASK>
Signed-off-by: Arvind Yadav <Arvind.Yadav@amd.com>
---
drivers/gpu/drm/scheduler/sched_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
index 6684d88463b4..390272f6b126 100644
--- a/drivers/gpu/drm/scheduler/sched_main.c
+++ b/drivers/gpu/drm/scheduler/sched_main.c
@@ -172,7 +172,12 @@ drm_sched_rq_select_entity(struct drm_sched_rq *rq)
static void drm_sched_job_done(struct drm_sched_job *s_job)
{
struct drm_sched_fence *s_fence = s_job->s_fence;
- struct drm_gpu_scheduler *sched = s_fence->sched;
+ struct drm_gpu_scheduler *sched;
+
+ if (!s_fence)
+ return;
+
+ sched = s_fence->sched;
atomic_dec(&sched->hw_rq_count);
atomic_dec(sched->score);
--
2.25.1
next reply other threads:[~2022-09-30 8:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 8:48 Arvind Yadav [this message]
2022-09-30 11:26 ` Christian König
2022-09-30 15:39 ` Yadav, Arvind
2022-10-08 1:48 ` Michal Kubecek
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=20220930084810.4639-1-Arvind.Yadav@amd.com \
--to=arvind.yadav@amd.com \
--cc=Arunpravin.PaneerSelvam@amd.com \
--cc=Christian.Koenig@amd.com \
--cc=airlied@linux.ie \
--cc=amaranath.somalapuram@amd.com \
--cc=andrey.grodzovsky@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=shashank.sharma@amd.com \
--cc=steven.price@arm.com \
--cc=sumit.semwal@linaro.org \
/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
all inboxes | Powered by JetHome®