From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: fix vm_cpu_update hit NULL pointer
Date: Fri, 22 Mar 2019 16:42:54 +0100 [thread overview]
Message-ID: <583e1755-3c2a-8677-dda0-2f10ed8fc09a@gmail.com> (raw)
In-Reply-To: <1553232632-27710-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Am 22.03.19 um 06:30 schrieb Monk Liu:
> should use amdgpu_bo_map, otherwise you'll hit NULL
> pointer bug if with amdgpu_bo_kptr
Yeah that is a known problem. NAK to this one cause that would map the
BO at the wrong time.
But in general I have a proper fix for this in the pipeline.
Christian.
>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
> index 9d53982..1fb6295a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
> @@ -76,8 +76,10 @@ static int amdgpu_vm_cpu_update(struct amdgpu_vm_update_params *p,
> {
> unsigned int i;
> uint64_t value;
> + void *ptr;
>
> - pe += (unsigned long)amdgpu_bo_kptr(bo);
> + amdgpu_bo_kmap(bo, &ptr);
> + pe += (unsigned long)ptr;
>
> trace_amdgpu_vm_set_ptes(pe, addr, count, incr, flags);
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2019-03-22 15:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 5:30 [PATCH] drm/amdgpu: fix vm_cpu_update hit NULL pointer Monk Liu
[not found] ` <1553232632-27710-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2019-03-22 15:42 ` Christian König [this message]
[not found] ` <583e1755-3c2a-8677-dda0-2f10ed8fc09a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-03-24 3:42 ` Liu, Monk
[not found] ` <BYAPR12MB33014544E9805DC79F9E3EA1845D0-ZGDeBxoHBPmRc1D8ZEEGsgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-03-25 12:14 ` Christian König
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=583e1755-3c2a-8677-dda0-2f10ed8fc09a@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.