From: "Nicolai Hähnle" <nhaehnle@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Nicolai Hähnle" <nicolai.haehnle@amd.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 2/2] Revert "drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()"
Date: Tue, 14 Feb 2017 10:18:45 +0100 [thread overview]
Message-ID: <20170214091845.1225-3-nhaehnle@gmail.com> (raw)
In-Reply-To: <20170214091845.1225-1-nhaehnle@gmail.com>
From: Nicolai Hähnle <nicolai.haehnle@amd.com>
This reverts commit 38fc4856ad98f230bc91da0421dec69e4aee40f8, which
introduces a use-after-free.
The underlying bug should be properly fixed with "drm/ttm: never add BO
that failed to validate to the LRU list".
Cc: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Cc: zhoucm1 <david1.zhou@amd.com>
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 556236a..d1ef1d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -403,11 +403,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
&bo->placement, page_align, !kernel, NULL,
acc_size, sg, resv ? resv : &bo->tbo.ttm_resv,
&amdgpu_ttm_bo_destroy);
- if (unlikely(r != 0)) {
- if (!resv)
- ww_mutex_unlock(&bo->tbo.resv->lock);
+ if (unlikely(r != 0))
return r;
- }
bo->tbo.priority = ilog2(bo->tbo.num_pages);
if (kernel)
--
2.9.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-02-14 9:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 9:18 [PATCH 0/2] drm/ttm, amdgpu: fix use-after-free in recent deadlock fix Nicolai Hähnle
2017-02-14 9:18 ` Nicolai Hähnle [this message]
[not found] ` <20170214091845.1225-1-nhaehnle-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 9:18 ` [PATCH 1/2] drm/ttm: never add BO that failed to validate to the LRU list Nicolai Hähnle
2017-02-14 10:38 ` Christian König
[not found] ` <ef1d2448-4296-5eaf-a852-5000bd16a947-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-02-14 11:37 ` Nicolai Hähnle
[not found] ` <3ac4923c-61b9-8ee9-e9cb-d7a60fc51dbf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 12:53 ` Christian König
2017-02-14 10:10 ` [PATCH 0/2] drm/ttm, amdgpu: fix use-after-free in recent deadlock fix Samuel Pitoiset
2017-02-14 11:11 ` Samuel Pitoiset
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=20170214091845.1225-3-nhaehnle@gmail.com \
--to=nhaehnle@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=nicolai.haehnle@amd.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