From: "Michał Winiarski" <michal.winiarski@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH 2/3] drm/i915/userptr: Hold mmref whilst calling get-user-pages
Date: Sun, 3 Apr 2016 23:11:08 +0200 [thread overview]
Message-ID: <20160403211107.GA10677@mwiniars-mobl2.ger.corp.intel.com> (raw)
In-Reply-To: <1459703647-25795-2-git-send-email-chris@chris-wilson.co.uk>
On Sun, Apr 03, 2016 at 06:14:06PM +0100, Chris Wilson wrote:
> Holding a reference to the containing task_struct is not sufficient to
> prevent the mm_struct from being reaped under memory pressure. If this
> happens whilst we are calling get_user_pages(), explosions errupt -
> sometimes an immediate GPF, sometimes page flag corruption. To prevent
> the target mm from being reaped as we are reading from it, acquire a
> reference before we begin.
>
> Testcase: igt/gem_shrink/*userptr
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: stable@vger.kernel.org
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
-Michał
> ---
> drivers/gpu/drm/i915/i915_gem_userptr.c | 29 +++++++++++++++++------------
> 1 file changed, 17 insertions(+), 12 deletions(-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-03 21:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-03 17:14 [PATCH 1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns Chris Wilson
2016-04-03 17:14 ` [PATCH 2/3] drm/i915/userptr: Hold mmref whilst calling get-user-pages Chris Wilson
2016-04-03 21:11 ` Michał Winiarski [this message]
2016-04-05 12:22 ` [Intel-gfx] " Tvrtko Ursulin
2016-04-03 17:14 ` [PATCH 3/3] drm/i915: Store i915 pointer for userptr i915_mm_struct Chris Wilson
2016-04-03 21:12 ` Michał Winiarski
2016-04-04 6:27 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns Patchwork
2016-04-05 12:05 ` [PATCH 1/3] " Tvrtko Ursulin
2016-04-05 12:34 ` Chris Wilson
2016-04-05 13:59 ` [PATCH v2 " Chris Wilson
2016-04-05 14:00 ` [PATCH v2 2/3] drm/i915/userptr: Hold mmref whilst calling get-user-pages Chris Wilson
2016-04-05 14:00 ` [PATCH v2 3/3] drm/i915/userptr: Store i915 backpointer for i915_mm_struct Chris Wilson
2016-04-05 15:27 ` [PATCH v2 1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns Tvrtko Ursulin
2016-04-05 16:57 ` ✗ Fi.CI.BAT: failure for series starting with [v2,3/3] drm/i915/userptr: Store i915 backpointer for i915_mm_struct (rev4) Patchwork
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=20160403211107.GA10677@mwiniars-mobl2.ger.corp.intel.com \
--to=michal.winiarski@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox