From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>, stable@vger.kernel.org
Subject: Re: [PATCH] drm/radeon/vm: don't attempt to update ptes if ib allocation fails
Date: Thu, 14 Nov 2013 09:33:03 +0100 [thread overview]
Message-ID: <52848ABF.7030404@vodafone.de> (raw)
In-Reply-To: <1384374541-28696-1-git-send-email-alexander.deucher@amd.com>
Am 13.11.2013 21:29, schrieb Alex Deucher:
> If we fail to allocate an indirect buffer (ib) when updating
> the ptes, return an error instead of trying to use the ib.
> Avoids a null pointer dereference.
>
> Bug:
> https://bugzilla.kernel.org/show_bug.cgi?id=58621
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
I'm getting old. I've seen that as well while working on the VM page
table init, but forgotten to fix it...
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/radeon/radeon_gart.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
> index cd7489b..3044e50 100644
> --- a/drivers/gpu/drm/radeon/radeon_gart.c
> +++ b/drivers/gpu/drm/radeon/radeon_gart.c
> @@ -1209,6 +1209,8 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev,
> return -ENOMEM;
>
> r = radeon_ib_get(rdev, R600_RING_TYPE_DMA_INDEX, &ib, NULL, ndw * 4);
> + if (r)
> + return r;
> ib.length_dw = 0;
>
> r = radeon_vm_update_pdes(rdev, vm, &ib, bo_va->soffset, bo_va->eoffset);
prev parent reply other threads:[~2013-11-14 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-13 20:29 [PATCH] drm/radeon/vm: don't attempt to update ptes if ib allocation fails Alex Deucher
2013-11-14 8:33 ` Christian König [this message]
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=52848ABF.7030404@vodafone.de \
--to=deathsimple@vodafone.de \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=stable@vger.kernel.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.