From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Pin pages whilst allocating for dma-buf vmap()
Date: Fri, 29 Nov 2013 15:00:43 +0100 [thread overview]
Message-ID: <20131129140043.GX27344@phenom.ffwll.local> (raw)
In-Reply-To: <1385725499-9342-1-git-send-email-chris@chris-wilson.co.uk>
On Fri, Nov 29, 2013 at 11:44:59AM +0000, Chris Wilson wrote:
> During the vmap() routine for the dma-buf, we first grab the pages and
> then try to allocate a temporary array to pass to the vmap(). However,
> the shrinker can and will reap any object that is unbound if the
> allocation for the array first fails. This includes the object which we
> are attempting to vmap(). The solution is to mark the object's pages as
> pinned whilst we try the allocation to prevent the use-after-free
> introduced by the potential shrinkage.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Picked up for -fixes, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2013-11-29 14:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 11:44 [PATCH] drm/i915: Pin pages whilst allocating for dma-buf vmap() Chris Wilson
2013-11-29 14:00 ` Daniel Vetter [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=20131129140043.GX27344@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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